Hi,
I have a UltrawinGrid and a UltraGridExcelExporter on my form.
I just do :
GridExport.Export(myGrid,"toto.xlsx");
The export works fine except the header name are missing on the exported file.
First line of the excel file is empty
Data begin at line 2.
What should I do in order to get the header name appear correctly in my excel file ?
Thanks
My mistake...
the header is ok but the display in excel is not good because fore color and backcolor are set to white... which means values are not visible till changing one of the color (background or forecolor)...
what is the reason for that ?
The exporting is WYSIWYG. So the only explanation for this is that your ForeColor is white on the screen. But if that were the case, then presumably, the backcolor would be a dark color so that you could see the text and then you would be able to see that color in Excel, also.
Is the ForeColor of the headers white?
Hi
No, the forecolor is black and I use style in my form (UltraformManager is there).. so there's maybe a caveeat with that but anyway,
I found a way to solve that by doing this:
private void EtatExporter_HeaderCellExporting(object sender, Infragistics.Win.UltraWinGrid.ExcelExport.HeaderCellExportingEventArgs e) { e.GridHeader.Appearance.ForeColor = Color.Black; }
Which is quite weird because I can see header (but with the style associated) when using it normally...
Well... if you can post a small sample demonstrating the problem, I can find out why it's exporting white in the first place. But without a sample, I can't really guess.
That seems like a good workaround, though.
sorry can't send sample
I suppose that the fact to use style (nautilus one in my case) may cause strange behavior sometimes.
anyway, as far as I get a workaround, it's ok for me.