Click here to Skip to main content
15,891,253 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
What is the best way to save the Datagridview Content?
Thank you for any response I can get on this.
Posted
Updated 28-Mar-12 14:15pm
v2
Comments
Thilina Chandima 28-Mar-12 21:15pm    
explain more about your problem..

You have a number of different optiona: XML, text, or Excel. Normally would recommend either xml or excel. Excel has the adbantage in the users can open the file, and play with the data. XML is a standard that is easy to work with with software. You can also save in binary, which takes less space, but hard to debug since it is not human readable. One important note about excel, and that is you have to have Excel installed, and cannot be used on a server. There was a product called ExcelWriter that would work on a server without Excel.
 
Share this answer
 
v2
Comments
Al Yambo 29-Mar-12 13:16pm    
Thank you for your response. One more question -- So you cannnot open the excel file on your application if EXCEL spreadsheet software is not installed?
Clifford Nelson 29-Mar-12 13:45pm    
To be able to do anything by read Excel file, you need Excel (this is what I understand from others, always have had excel installed). You can get a reader from the web, but that probably only helps the user, not your application. If you do not have excel installed, can create a CSV file, with is the cells with commas between elements. You will have to add quotes on cell items that contain commas.
Hi,

options are - XML, Excel, CSV.
In these i will prefer CSV files. It is very simple to transfer the data from datagridview to CSV files.

CSV, comma separated values, files are commonly used to transport large amounts of tabular data between either companies or applications that are not directly connected. The files are easily editable using common spreadsheet applications like Microsoft Excel.
 
Share this answer
 
Comments
Al Yambo 29-Mar-12 13:21pm    
Thank you for your response. One more question -- Can these CSV files have colored cells and set fonts for instance when opened in Microsoft Excel?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900