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.
Hello Boris,
yes it worked, thank you for the hint.
Is there a list of changes since build 8.3 - 1009 ?
Just to know what we should retest in our application.
Regards,
Jan
Hello Jan,
Could you please try this out with the latest service release of version 8.3 - '2138' and let me now if it worked for you.
Hello Mike,
we using 8.3, does it work as well ? I replaced all references to Infragistics2.Win.UltraWinGrid.ExcelExport.v8.3 and Infragistics2.Excel.v8.3.dll with Infragistics3.*, rebuilt all projects but I am receiving this error when I try export grid with 66 k rows:
Fail: Can't export more rows than MaxExcelRowCount. Use FileLimitBehaviour property if you want to change default behaviour.
I call
_excelExporter.Export(ug, filename,Infragistics.Excel.
WorkbookFormat.Excel2007);
and the filename has xlsx extension.
Do I need to do something else?
Thanks.
Regards.
Hi Wolfgang,
The error message here clearly indicates that your application is still reference the Infragistics2.Excel assembly.
Make sure you are using Infragistics3 for both the Excel and the Wingrid Exporter assembly.
If you have more than one project in your solution, make sure you check all of the projects.
Also, open up the license.licx file for your project(s) and delete the contents of that file, in case it's referencing the wrong assemblies.
Hi all!
Have the same problem. Removing the old excel2 and add the Excel3 causes some strange errors:
Me.UltraGridExcelExporter1.DefaultWorkbookPaletteMode = Infragistics.Excel.WorkbookPaletteMode.StandardPalette
is not longer working (Text translated: via google ;-(:
Error 3 on the assembly "Infragistics2.Excel.v9.2", the "Infragistics.Excel.WorkbookPaletteMode" includes, reference is made indirectly. Add the project reference to a file "C: \ Program Files \ Infragistics \ NetAdvantage 2009.2 \ windows forms \ bin \ Infragistics2.Excel.v9.2.dll" added
)
Also
exporter.Export(locGrid, xFile.Worksheets(0))
gives me an error (worked fine with Excel2)
rgds
Wolfgang