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
65
multiple ultragrids = multiple worksheets in one workbook
posted

I have an WinForm application with multiple infragistics UltraGrids. Can I export all the grids to excel at once, with each grid using it's own worksheet in one workbook? A simple example would be greatly appreciated.

Thanks,

Sherry

Parents
No Data
Reply
  • 44743
    Verified Answer
    posted

    You can create your own Workbook instance, add Worksheets to it, and export directly to those Worksheets:

    Workbook workbook = new Workbook();

    Worksheet sheet1 = workbook.Worksheets.Add("Sheet1");

    this.ultraGridExcelExporter1.Export(this.ultraGrid1, sheet1);

    Worksheet sheet2 = workbook.Worksheets.Add("Sheet2");

    this.ultraGridExcelExporter1.Export(this.ultraGrid2, sheet2);

    // ...

    workbook.Save("C:\\grids.xls");

Children