GroupingGridExcelConverterControl - Export the values as of Type Text

Hi ,

I am using the
converter.GroupingGridToExcel(aSelectedGrid, saveFileDialog.FileName, Syncfusion.GridExcelConverter.ConverterOptions.Visible);
to export the values to an spread sheet . While exporting, one of the column value in gridgrouping control is lossing its format because of the excel property.

how can i fix this while exporting ?

for eg a value of '3073E0108 is exported as '3.073E+108'

Thanks,
Shiju

3 Replies

HA haneefm Syncfusion Team July 3, 2007 11:18 PM UTC

Hi Shiju,

Below is a forum that discuss with the simillar issue in a grid.
http://www.syncfusion.com/support/Forums/message.aspx?&MessageID=42662

The ExportElement event has newly added in Essential Studio V5.1.In that event, you can customize the exported element from the grid. Below are the code snippet.

GroupingGridExcelConverterControl converter = new GroupingGridExcelConverterControl();
converter.ExportElement += new GroupingGridExcelConverterControl.GridExportElementEventHandler(converter_ExportElement);

void converter_ExportElement(object sender, GridExportElementEventArgs e)
{
Console.WriteLine(e.Element.Info);
Record rec = e.Element.GetRecord();
if (e.Element.Kind != DisplayElementKind.AddNewRecord
&& rec != null)
{
rec.SetValue("ParentName", "welcome");
}
}

Best regards,
Haneef


HY Harsh Yarlagadda October 12, 2011 09:48 PM UTC

The example does not show, how to retain the formatting. I have a groupinggrid control and I am using GroupingGridToExcel to export it to excel. I cannot use GridExcelConverterControl, since it does not export the hidden rows. I have numeric value formatted as Percentages and Currencies. How to retain this formatting while able to export all the hidden rows?



RB Ragamathulla B Syncfusion Team October 25, 2011 12:02 PM UTC

Hi Harsha,

We deeply regret for the delay,

Please let me know which version you are using which is helpful for us to have a closer look and provide you a better solution.

Appreciate your patience.

Regards,
Ragamathullah B.



Loader.
Up arrow icon