I want to read and write excel file . it can do with oledb , there is a limitation
- maximunm characters < 255
- solution is mono data type , now create table become second sheet (when open excel it is shown as hidden.)
please give proper answer
I want to read and write excel file . it can do with oledb , there is a limitation
please give proper answer
There's twothree (Thanks Behrooz) ways of doing this, the first is using FileHelpers to create a ordinary CSV file which can be read by Excel. The other way is to use a common BIFF file format, see here on CodeProject on how to accomplish this. The third way is to use an ODBC connection to the Excel spreadsheet as shown here on Codeproject also. The fastest way of doing it IMHO is to work with the BIFF format. Also here on CodeProject is a fast Excel reader, similar to the DataReader class but for Excel only.
OpenOffice.org has extensive documentation on the binary format for the excel spreadsheets here, this is a PDF document which outlines the BIFF layout and structure.
Edit: Amended this as Behrooz pointed out a small grammer-typo....
Hope this helps, Best regards, TOm.
SpreadsheetGear for .NET will do it.
You can see live ASP.NET samples with C# and VB source here and download a free trial here if you want to try it yourself. The trial is fully functional for 30 days.
Disclaimer: I own SpreadsheetGear LLC