Hi,
I want to export data from multile tables to the same workbook. But this is from a console application i.e. the grid is not on a form. The export does not work even if the tables have rows. The file has only the empty worksheets.
UltraGridExcelExporter excelExport = new UltraGridExcelExporter();
//....adding 4 tables to the dataset and filling in with data
grid.DataSource = dataSet.Tables[0];
excelExport.Export(grid, ws);
grid.DataSource = dataSet.Tables[1];
grid.DataSource = dataSet.Tables[2];
wb.Save(ConfigurationManager.AppSettings["E3_REPORT_FILE"]);
While I am not familiar with the ExcelExport functionality as much, I'm guessing that your issue is that the grid doesn't have any rows even before you try to export it. Since the grid is not on a form, it doesn't have a binding context available to it to acquire the various data through the BindingManager, so try assigning a new BindingContext object to the grid after you create it.
-Matt
Thanks ! That worked great.
-Anand