Remove extra(empty) commas at the end of the line for the content above table while exporting to CSV

Hi
I have a tabular data of 25 columns above which I have to display some three lines of information. When I export the data to csv empty commas are getting appended for the information i display above the table


It is something like this

Report Name,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Report Info,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Generated Date,abc,,,,,,,,,,,,,,,,,,,,,,
column1,column2,column3,column4,column5,column6,column7,column8
row1,row2,row3,row4,row5,row6,row7,row8

For the data above the column, the empty commas are getting added whose number is equal to the number of columns in the table

Can some body pls suggest me how to avoid these extra commas.

My requirement is some thing like this
Report Name
Report Info
Generated Date,abc
column1,column2,column3,column4,column5,column6,column7,column8
row1,row2,row3,row4,row5,row6,row7,row8

I want to strip off those extra commas when the report gets generated. Can somebody pls sugges me how to go about doing this as this has become  very critical for my project
 

mohanbelaguli's picture
Joined: Jul 2 2012 - 12:08am
Last seen: 11 years 2 months ago

0 Answers:

No answers yet
Feedback