cancel
Showing results for 
Search instead for 
Did you mean: 

Excel data formatting

Former Member
0 Kudos

Hi all,

following the tutorial "Exporting context data into Excel using the WD binary cache" I've added an export function to my wd app for a table's contents.

In the Excel document I'd like to treat all as text, avoiding e.g. the null values written, the ...E+17, deletion of leading zeroes and so on.

Can you help me please?

Thanks.

Angelo

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Angelo,

If your client's Excel application supports XML format (starting from Office XP, AFAIK) you may produce output in Excel XML rather then CSV(comma separated values) while former allows formatting.

You may get details about MS Office specific XML schemas here http://www.microsoft.com/office/xml/default.mspx .

Next, if this format is useful for you, you may use code posted here () to convert context node data to XML. You may either supply XSL template to transform generic XML into Excel-specific XML (better option) or modify original code to produce Excel XML directly.

Valery Silaev

EPAM Systems

http://www.NetWeaverTeam.com

Former Member
0 Kudos

Thanks Valery,

as the tutorial says, I already get an XML list to open through Excel. The fields making the node I export are all strings, so the conversion to text format would have to be easy but I have the problems mentioned above.

Is it possible to avoid an xml schema in this case?

Regards,

Angelo

Former Member
0 Kudos

Hmmm....

I guess "no".

Also Excel could display arbitrary XML, it is necessary to use Excel-specific XML (with schema) to define formatting.

VS

Former Member
0 Kudos

Thanks again Valery,

I decided to modify the "toExcel" method to adapt it to Excel 2003 and obtain a compliant version.

Regards,

Angelo