Reputation: 4021
How can I write an excel sheet with two field(let them be f1,f2 of a DataTable) in C#?
Upvotes: 0
Views: 165
Reputation: 56697
You can use the OleDb
components to achieve this using SQL. A sample is given in this question.
Please note that to use this with Excel 2003 files, your program must be compiled X86 only, as the JET driver is available for 32-bit only.
To write Excel 2007/10 files, you need to use a different JET driver (see here).
Upvotes: 1