Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
55
Excel export does not include "built-in" styles...
posted

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;

using

System.Collections.Generic;

using

System.Text;

using

Infragistics.Win.UltraWinGrid;

using

Infragistics.Excel;

using

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.

}

}

}