We have mulitple grids, that are need export to single excel file and started export from 6th row in excel
d't have issue with 2003 excel format using below statement.
ultraGridExcelExporter1.Export(ugExposure, objWorkBook.Worksheets["Exposure"], 6, 0);ultraGridExcelExporter1.Export(ugExposureCurrncy, objWorkBook.Worksheets["Exposure Currency"], 6, 0);ultraGridExcelExporter1.Export(ugTAA, objWorkBook.Worksheets["TAA"], 6, 0);ultraGridExcelExporter1.Export(ugTAACurrency, objWorkBook.Worksheets["TAA Currency"], 6, 0);ultraGridExcelExporter1.Export(ugSAA, objWorkBook.Worksheets["SAA"], 6, 0);
Version : NetAdvantage 2011.2 (Windows form)
my question, how I can export these into single excel file in 2007 version, export method for excel format does not have option for workbook & location properties.
ultraGridExcelExporter1.Export(ultraGrid1, "C://temp/test.xlsx", WorkbookFormat.Excel2007);
thanks
Anbu
Hi,
If you are using CLR2, then you cannot export to Excel 2007 unless you create your own packaging utility (or perhaps there is a third-party packaging utility you could buy).
You need at least CLR3 to create Excel2007 files without doing your own packaging.
I am getting below error, we are using .net 2.0 framework.
"packageFactory cannot be null. When saving to Excel2007 workbook format and using the
Infragistics2.Documents.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.Documents.Excel assembly instead, and the packaging will be handled by the WindowsBase class"
Thanks
Hello Anbu,
Have you been able to resolve your issue ? If you still have any concerns or questions I will be glad to help. If you need any additional assistance don’t hesitate to ask.
Regards
One possible approach could be if you are using the code below.
Infragistics.Documents.Excel.Workbook wb = new Infragistics.Documents.Excel.Workbook( Infragistics.Documents.Excel.WorkbookFormat.Excel2007);
Infragistics.Documents.Excel.Worksheet worksheet1 = wb.Worksheets.Add("UltraGrid 1");
Infragistics.Documents.Excel.Worksheet worksheet2 = wb.Worksheets.Add("UltraGrid 2");
ultraGridExcelExporter1.Export(ultraGrid1, worksheet1);
ultraGridExcelExporter1.Export(ultraGrid2, worksheet2);
wb.Save("..\\..\\Test.xlsx");
Process.Start("..\\..\\Test.xlsx");
Let me know if you have any questions.