cancel
Showing results for 
Search instead for 
Did you mean: 

Wrong order on Exporting table to Excel file

former_member300754
Participant
0 Kudos

Guys,

I follow the tutorial [https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/user-interface-technology/wd%20java/wdjava%20archive/exporting%20context%20data%20into%20excel%20using%20the%20web%20dynpro%20binary%20cache.pdf] Unfortunately Excel, the order of columns is wrong.

Would anyone tell me how to set the order of column displaying in exported Excel file?

Thanks in advance.

Peerasit

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

your columns must be on alphabetical order, no mather the order you did put them on the toExcel function

change the toExcel function with this:

/people/amitkumar.singh/blog/2008/11/30/formatted-excel-using-on-demand-stream-without-ext-apis

this would help if you follow that way to do it:

http://msdn.microsoft.com/en-us/library/aa140066(office.10).aspx#odc_xmlss_ss:column

also youll get a better formating

regards

Answers (3)

Answers (3)

former_member300754
Participant
0 Kudos

Not solve

Former Member
0 Kudos

Hi,

I dont know what sequence you get by following the code mentioned in PDF but the sequence depends on how you iterate through the data fetched

former_member192434
Active Contributor
0 Kudos

Hi

If you see page No.18 of given Blog there u find cols are put into HashMap insted of it you can use sortedMap./or you sort it by its value.

Thanks

former_member300754
Participant
0 Kudos

Yes, i did see it. But the order is not correct. The tutorial gives the wrong order as well.

Peerasit