Hi,
I'm trying to load an .xslx file with the Workbook.Load() method. What I've found so far is that I have to use the Load method with the IPackageFactory parameter. But I haven't found any class which implements this interface.
How can I pass a valid IPackageFactory "object" to the Load method to load the .xslx file?
Thanks for your help,
KurtJulis
Hi Kurt,
You only need an IPackageFactory if you are using CLR2. Does your application need to be limited to CLR2?
If you can use CLR3, then then you just need to make sure you are using the Infragistics3.Excel assembly instead of Infragistics2.Excel.
If you are limited to CLR2, then it's up to you to handle the packaging yourself.
Hi Mike,
thanks for the quick answer. Unfortunatelly, I'm limited to CLR2 and have to do it on my own (or put the feature on hold) until we switch to CLR3.
Is there any KB article (haven't found one) about creating a simple packaging class?
Regards,
KurtJulius
There's a sample including with the NetAdvantage SDK which shows how to implement the interface. But the code doesn't actually do the packaging, it relies on the DotNet Framework CLR3 to do it. If you want to create xlsx files without CLR3, then you will probably need to purchase some third-party packaging softward to do the packaging for you. Unless you want to try to write the code to pack files yourself.
The sample is in a folder something like this:
...\2009.2\Samples\WinMisc\CS\Excel 2007 Custom Packaging CS