Hi,
I've encountered a situation where the result of exporting a UltraWinGrid to an excel file does not contain the built in styles (Comma, Currency and Percent) which are bound to the standard Excel toolbars.
What's interesting is that if I load an excel file with these styles intact using the infragistics API I can see them in the styles collection although they are represented using private types. I've not been able to duplicate them in an export.
Is this a bug? Can anyone suggest any workarounds?
Thanks in advance!
The code below reproduces the problem:
using
System;
System.Collections.Generic;
System.Text;
Infragistics.Win.UltraWinGrid;
Infragistics.Excel;
Infragistics.Win.UltraWinGrid.ExcelExport;
namespace
InfragisticsExcelExport
{
class Program
static void Main(string[] args)
UltraGrid ExportGrid = new UltraGrid();
string ExportFileName = "C:\\InfragisticsExcelExport.xls";
UltraGridExcelExporter Exporter = new UltraGridExcelExporter();
Exporter.Export(ExportGrid, ExportFileName);
// Resulting excel file does not include "built-in" styles:
// Currency, Percent or Common.
}
I am creating a support request to handle this issue for you. You can visit the My Support Requests page for the details of your issue. Thank you.
Thanks very much for the replies and the support request!
I've tried the workaround but with only partial success, that is: the styles now exist in the resulting export but their format strings do seem to have survived and applying them has no effect on a cell. On the "up" side the "Style <style name> not found" errors are gone and Excel no longer crashes when one tries to edit the styles.
If there are anymore suggestions let'em fly! In the meantime I'll double check and make sure that it's nothing I'm doing (or not doing.)
Thanks again!