tags:

views:

62

answers:

1

Hi,

I was wondering if anyone knows how to write an actual table/grid to a csv file....i dont mean the content of the table/grid, i mean the actual grid lines etc etc, headers, axis.....

Thanks greatly in advance.

U.

A: 

As MPritch has said the CSV format is plain text and as such seems unsuitable to your needs. If you have a grid object that you're happy with you can probably serialise it to disk using one of the formatters (eg BinaryFormatter) or the XmlSerialiser.

Phil
Will this end up providing me with a file that contains the grid contents? Or will this actually serialize the lines as well, and actual write the grid to the file?Thanks.
@urema: it should keep any of the properties you set on the grid. it's very simple code `binaryFormatter.Serialize(gridObject);` - give it a try.
Phil
Ill give this a try anyway for my own knowledge....however I have got an updated requirement stating that this needs to be written through a XPSDocument....so all is good.Thanks for your help!