I used some sample code I found on the Infragistics web site to write a group of DataTables to an Excel spreadsheet workbook in Excel 2007 format, with separate worksheets for each DataTable. However on the workbook.Save (fileName) method call, I get an exception that states:
"packageFactory cannot be null. When saving to Excel2007 workbook format and using the Infragistics2.Excel assembly, you must provide an IPackageFactory to handle the packaging of data. If you are using the DotNet Framework 3.0 or higher, use the Infragistics3.Excel assembly instead, and the packaging will be handled by the WindowsBase class"
I'm creating a WinForm client application targeting .NET 3.5. I have installed the latest version of Infragistics 10.3 WinForm libraries and I have no Infragistics3.Excel assemblies available, only Infragistics2.Excel assemblies show up.
Where can I find the Infragistics3.Excel assembly referred to in the exception?
If it is not available, then how do I create a simple default IPackageFactory similar to the one that you've implemented in your Infragistics3.Excel assembly.
Thanks for any suggestions or help you can provide.
You project reference are referencing Infragistics2.Excel instead of Infragistics3.Excel. You just have to remove the former and add the later. They are both installed with NetAdvantage. Just right-click on the project references in Visual Studio and select "Add Reference" and then choose Infragistics3.Excel from the list.
Thanks for the clarification - I should have realized the answer myself. I hadn't installed both versions, which is why I had only seen the .NET 2.x compabile version of the Infragistics assemblies.
Upgrading is a simple solution to my problem - appreciate the response.