cxGrid导出到Excel,对于Currency类型总是加上了货币符号,可以修改导出文件设置来去掉:
在cxXLSExport.pas文件中,修改:
procedure TcxXLSExportProvider.SetCellDataCurrency(const ACol, ARow: Integer; const AValue: Currency); begin if xlsCheckPos(ACol, ARow) then //FCells.SetCellDataCurrency(ACol, ARow, AValue); FCells.SetCellDataDouble(ACol, ARow, AValue); end;
本文介绍如何在cxGrid导出至Excel时,通过修改cxXLSExport.pas文件中的SetCellDataCurrency方法,将Currency类型的数值导出为不带货币符号的纯数字,避免不必要的格式问题。
2966

被折叠的 条评论
为什么被折叠?



