Reputation: 841
I have to find the best way to integrate my application with excel. Basically, I have to make some fancy frontend for filling input data, and later showing the output. The calculations have to be made in .VBA macro. Basically:
What we did before was to have excel .vba macro be auto-execute on open, fetch data from file, and then output it to another one. Then the application would just have to write input data to file, exec .xls and wait for output file. This approach obviously has many limitations: no error reporting, having to wait for file to appear, lots of hustle to get filepaths correct.
Are there any good ways to achieve that, for example using some .NET magic? I am open to all solutions, including all kind of technologies and languages ;)
Upvotes: 0
Views: 1371
Reputation: 57573
You could try using Excel.Interop developed in framework.
So you could open your excel file and then:
In this link you can find something useful with Excel.Interop.
Anyway if you search "C# Excel example" in Google you find tons of examples...
Upvotes: 1