cancel
Showing results for 
Search instead for 
Did you mean: 

URGENT: unable to export data from table to Excel using ExcelExportComp

Former Member
0 Kudos

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

  1. Is the problem with the version of the Excel. Is there is a way to solve this issue

Using the same component.

  1. How to handle the versioning problem in future.( any permanent solution).

  2. 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.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

i had resolve this.

Former Member
0 Kudos

Hi Syed,

Hope this will help u

regards

Sumit

Former Member
0 Kudos

Hi,

I didn't get the information i want. any how thanks for your responce

former_member197348
Active Contributor
0 Kudos

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