Create and write XLS using OleDB

Joined
Jun 2, 2005
Messages
7
Reaction score
0
I have an ArrayList of string[] objects that I just want to dump to an Excel spreadsheet.
All the string[] objects are the exact same length, no null values.

How do I create an Excel file without Interop?

I'm trying
objCmd.CommandText = "Insert into [Sheet1$] values('a','b')";
after I manually create a file.. and sometimes that has worked and sometimes it will tell me "number of query values and destination fields are not the same".
I don't use column names. I just want to dump the values.
Any ideas?
 
Bump.
Can anyone help with this problem?

I just need to:
-create a new XLS file
-fill a sheet with the values

The 2nd part works fine for a manually created spreadsheet, but this must be done on the fly.
I want to avoid using Interop if possible.
If you believe I have to use Interop please tell me.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top