on 12-06-2007 12:55 PM
HI,
i used ExcelExportComp in my application and calling exportToExcel2003() method from a view when button is pressed. i had tested it, popup with xml list is selected then getting the Excel sheet with the data in my local system, working fine. So the activity is released in Dev & QA. .
In both Dev & QA. If i test from my local system, able to get the excel sheet.
but when tested in same Dev & QA from other location (state) ( other system ) am not able to see the Excel sheet (The popup with the XML List to select does not appear.). that it is not working.
Local system : Excel 2003
other system: Excel 2002
Is the problem with the version of the Excel. Is there is a way to solve this issue
Using the same component.
How to handle the versioning problem in future.( any permanent solution).
Is there a generic way. Can we make it generic for any version even for older versions?
Lets give ur suggestions, will be appriciated.
Thanks
Syed.
i had resolve this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Syed,
You have to use Excel 2003 only for <b>ExcelExportComp </b>. See the method itself e<b>xportToExcel2003() </b>
The reason is Excel2003 is XML schema supported and Excel2003 is Bytecode supported.
As for as I know this method works for later than Excel2003.
You try this: Convert everything into characters
in <b>exportToExcel2003() </b>
byte[] excelXMLFile;
IWDResource cachedExcelResource = null;
excelXMLFile = toExcel(dataNode, columnInfos).getBytes("UTF-8");
cachedExcelResource = getCachedWebResource(excelXMLFile, fileName, WDWebResourceType.XLS);
....
And in <b>toExcel(IWDNode dataNode, Map columnInfos)</b>
StringBuffer x = new StringBuffer();
String attributeName, headerName;
char tb = (char) 9;
for (int i = 0; i < dataNode.size(); i++)
{
IWDNodeElement dataNodeElement = dataNode.getElementAt(i);
for (int m = 0; m < columnInfos.size(); m++)
{
x.append(dataNodeElement.getAttributeValue((String) columnInfos.get(m + ""))).append(tb);
}
x.append("\n");
}
return x.toString();
regards,
Siva
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.