When trying to export to excel I've got a problem in the ExportTasks method
The exception says:
An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in TaskVision.exe
Additional information: Old format or invalid type library.
I do have Office XP with SP2 installed, no problem running or compiling the program. Everything seems ok, except the above mentioned problem

Excel 2002 problem
Greg Darmo
As far as best practices, I think it's fair to say that COM interop is preferrable when the dependency files are being distributed with the application (or every client has the same library installed). In this case, the MS Office files could not be distributed and late binding would have probably been a better solution.
The reason why COM interop was chosen for this - was more for display, to demonstrate the feature (since late binding is nothing new).
Steve Fu
I know you can still do this in VB.NET, not sure about C# (I would believe not, as "Option Strict Off" doesn't exist ;)), so what is the "best practices" method for this Having to recompile with the new reference seems silly for cases like this.
Nightw0lf
Same exception raised.
it happens in line 28 of exporttasks where the code says:
workBook = excelApp.Workbooks.Add(XlWBATemplate.xlWBATWorksheet)
any suggestions
MaungMaung
There is a bug in excel, described in KB320369, it regards using an english version of excel but working with another locale.
problem solved using the following code before executing the line with an error
System.Threading.Thread.CurrentThread.CurrentCulture =
System.Globalization.CultureInfo.CreateSpecificCulture("en-US")
Thanks for all replies
Adria Grau