I'm using OleDB and I want to export my objects into excel table. Each row in the sheet will be one of my objects. The problem is that I don't know how to insert data when there's no column headers in the sheet.
This one:
commandString = "Insert into [Sheet1$] values('test1', 'test2')"
throws this exception:
Number of query values and destination fields are not the same.
My connection string is:
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+filename+";Extended Properties='Excel 8.0;HDR=No'"