cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Hi All,

I am working on export to excel functionality and using JEXCEL API to create it. When I export the data to excel sheet, the data are stored in text format in the excel sheet. If I click on summation button on excel sheet, it is not summing up the column values since it is stored as the text format.

I am writing the following code:

for(Iterator iter = columnInfos.keySet().iterator(); iter.hasNext();){

String attributeName = (String)iter.next();

for(int index = 0; index < dataNode.size(); index++){

try{

IWDNodeElement nodeElement = dataNode.getElementAt(index);

String colVal = nodeElement.getAttributeAsTex(attributeName);

Label value = new Label(j, index + 1, colVal);

sheet.addCell(value);

}

}

j++;

}

Here colVal is the variable which holds the data in string format. So I was just trying to convert it into integer format and used Integer.parseInt(colVal).

But Label keyword accepts only the int,int,string arguments.

Is there any other option to change it as integer value while exporting to excel sheet.

Pls suggest.

This is very urgent.

Regards,

Subashini.

0 Likes
View Entire Topic
nikhil_bose
Active Contributor
0 Likes

tell me what you need excatly?

where and what for you writing this code?

you need colValue in Excel as integer or what?

nikhiL