.NET ExcelLibrary Export Problems - .XLS corruption
- by hamlin11
The library is located here: http://code.google.com/p/excellibrary/
I'm using some basic code to create an .XLS file.
When I open the file in Excel 2007, I get the following errors:
I click yes, then I get:
And just for fun, here's the XML error details (not very helpful)
Here's the code that I'm using to generate the Excel file:
Dim ds As New DataSet
Dim dt1 As New DataTable("table 1")
dt1.Columns.Add("column A", GetType(String))
dt1.Columns.Add("column B", GetType(String))
dt1.Rows.Add("test 1", "Test 2")
dt1.Rows.Add("test 3", "Test 4")
ds.Tables.Add(dt1)
ExcelLibrary.DataSetHelper.CreateWorkbook("c:/temp/test1.xls", ds)
Note: I added a reference to the DLL provided by the project download page and have an "Imports ExcelLibrary.Office.Excel" to link up with it
Any ideas on what the corruption is and/or how to fix it?
Thanks