Hi,
I'm using the UltraExcelExporter to generate Sheets for an excel report. The informations I want to report are stored in datatable. So I load them to an ultrawingrid and then export them to excel using the excelexporter. The fore- and backcolors of the header- and summary cells really look bad (red textcolor on a black bachground in the header or black textcolor on a dark blue backcolor!!). And also the lines of the grid/cell are missing!
The code I use looks like this
Dim oExcelExporter As New Infragistics.Win.UltraWinGrid.ExcelExport.UltraGridExcelExporterDim oWS As Infragistics.Excel.Worksheet = oExcel.Worksheets.Add(Guid.NewGuid.ToString)
Dim oTempGrid As New Infragistics.Win.UltraWinGrid.UltraGridIf Not IsNothing(oStatement.RBEPlusValue) Then oWS.Rows(iRowCount).Cells(iColCount).Value = oStatement.name iRowCount += 1 oTempGrid.DataSource = oStatement.RBEPlusValue ' Comment: oStatement.RBEPlusValue TypeOf datatable
oExcelExporter.Export(oTempGrid, oWS, iRowCount, iColCount) iRowCount += oTempGrid.Rows.Count + 2 End If oTempGrid.Dispose()
The resulting excel find attatched !
Thanks for any help!
Cheers,
Michael
I have some additonal information about the strange behaviour. The problem occures when you copy a worksheet generated by the ultragridexcelexporter to another workbook. The copying process doesn't copy the colors and formats correctly (see attachment). So I think the problem is related to Excel and not to the ultragridexcelexporter.
Cheers