C# windows form and EXCEL vba question

  • Thread starter Thread starter Jason Huang
  • Start date Start date
J

Jason Huang

Hi,

In my C# 1.1 Windows form project, I would like to export record to Excel
2000 spreadsheet Record.xls.
I also need to do some data manipulation in the Record.xls.
How do I call the VBA from my C# windows from project?
Thanks for help.


Jason
 
To be honest, the simplest way to export to a spreadsheet is to simply
write the data as CSV. Apart from being simple, it doesn't require the
client exe (Excel), and it will be usable from anywhere. xls is not a
trivial format to write natively; you'd either need a helper utility
(which you might struggle to get for 1.1), or you should be able to
use interop to automat Excel directly by adding a COM reference or
using tlbimp to generate an interop assembly; xlsx is easier to write,
but still *much* harder than CSV.

Marc
 

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