Sometimes, I need to bind the grid and export it in a button click:
WebDataGrid1.StyleSetName="IG"
WebDataGrid1.datasource=ds
WebDataGrid1.databind()
WebExcelExporter.export(WebDataGrid1)
When I do this, the CSS styles are not exported. Is there some method that I need to use to get the CSS to export?
Hello Rob,
Please let me know if you need any further assistance regarding this matter.
When you donot call databind function. Does WebExcelExporter export styles including headers?
Please let me know if you have any further questions regarding this matter.
One additional note... calling "webdatagrid1.databind()" appears to contribute to the issue. If I just set the datasource without calling DataBind(), then the output has a higher chance of including formatting.
Prabha,
Unfortunately, your suggestion did not correct the issue. I will put together a complete code sample for you.
Also, I discovered another scenario where the output spreadsheet is missing column headers altogether.
Thanks, -Rob
Please let me know if I can provide any further assistance regarding this matter.