Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
337
Multiple grids export into excel 2007 format in single file.
posted

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

Parents
  • 53790
    posted

    Hello Anbu,

    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.

    Regards

Reply Children