Question Handling different versions of excel

giskumar

New member
Joined
Aug 25, 2011
Messages
3
Programming Experience
1-3
Hi all,

I have a problem with my windows application.

I have an application which exports data from datatable to excel. But my client m/c's are having different versions of excels.
Any one suggess me how to make it work in all m/c's ?

Thanks,
Kumar.
 
You need to use late-binding. You should develop your app using early-binding, i.e. turn Option Strict On for the project and add a reference to the appropriate Office type library. Once you're ready to release, remove the reference and turn Option Strict Off for the files that now contain errors. You can then modify your code as required. Check this out for an explanation and example:

My Technical Blog: Late Binding in C# and VB.NET
 
OleDB export may also be an option, if only the tabular data is needed. Or even a plain text csv export, those files usually open in Excel by default.
 
Back
Top