I'm trying to change the way data from the grid are exported to Excel based on the column number.
I'm using Flexcel and TAdvGridExcelExport that creates the link between a TAdvStringGrid and Flexcel, and C++ Builder 10.2.3

In the OnExportCell event of the TAdvGridExcelEport Object we have a function that contains:

void __fastcall TMainForm::AdvGridExcelExport1ExportCell(TObject *Sender, TExportCellEventArgs &Args)

  if(Args.GridCol == 0)
   Args.ExportDataType = Text;
But "Text" is not recognized, could you please help me? in the help, TExportDataType members are defined as:

Thank you.


Try with Args.ExportDataType = TExportDataType::Text;

FlexCel is compiled with scoped enums = on, this means that you have to use enum.value in Delphi and enum::value in C++

It's working, thank you Adrian!