Hi everyone!..
i'm facing an issue with the exporter, because, when export the WebDataGrid to excel, the format of the column "Total" is a decimal type, but in the exported file, this column is now in a string type.
anyone know what happen here? :(
btw, the WebExcelExporter that i use is, Infragistics35.WebUI.UltraWebGrid.ExcelExport.v11.1
Regards!
Alfredo Melo
Yep, it works fine with your suggestions!
Thanks for the tip :)
Well, i put this in the event:
e.Worksheet.Columns[7].CellFormat.FormatString = "$ 0.00";
for the column of Decimal type , i set the property DisableCellValueFormatting, but when export, the file xls is a string format yet...
any ideas ?:(
thanks!!
Hi David,
Thanks for the tip, i declare the method bounded with the event CellExported..can you please tell me.. how do i format the cell?
thanks in advance!!! :D
Hi Alfredo Melo,
When you have a DataFormatString, the excel exporter formats based on that, so the value ends up as a string in excel. There is a property called DisableCellValueFormatting which you should set to false. This will leave the value as the actual numbers. However, you will need to handle CellExported or GridRecordItemExported and set the format of the excel cell to format the data there.
regards,
David Young
HI!..
i'm sorry,but i was confused about the reference that i used, the reference is WebExcelExporter, and the exported datagrid, was in string format for all columns, even if i set their properties of DataType to Decimal, the result ever was a format string, also i set the DataFormatString property of the BoundDataField with the next format :
"{0:C}" and "$ {0:###,###,##0.00}"
but the exporter catch this values like a string format
Thanks in advance.