Tuesday, March 8, 2016

scExcelExport Component for Delphi 10 Seattle

As of this time of writings, scExcelExport component still not support Delphi 10 Seattle. Only Delphi XE8 will be able to compile the component without issue.

If you highly depend to this component, i will show you how to compile it in Delphi 10 Seattle (until the official release come out).
1. Open scExcelExportConfig.inc using text editor.
2. Add the code i have marked below inside scExcelExportConfig.inc:
{--------------------------------------------------------------------------------
* Description : scExcelExportConfig.inc - compiler directives
--------------------------------------------------------------------------------}
//******************* begin custom line ********************************
{$IFDEF VER300} // Delphi 10 : Default Excel2010, ExcelXP can also be used
  {$DEFINE EXCEL2010}
  {$DEFINE DELPHIXE8}
  {$DEFINE DELPHIXEORNEWER}
  {$DEFINE DELPHI2010ORNEWER}
  {$DEFINE DELPHI2006ORNEWER}
{$ENDIF}
//******************* end custom line ********************************
{$IFDEF VER290} // Delphi XE8 : Default Excel2010, ExcelXP can also be used {$DEFINE EXCEL2010} {$DEFINE DELPHIXE8} {$DEFINE DELPHIXEORNEWER} {$DEFINE DELPHI2010ORNEWER} {$DEFINE DELPHI2006ORNEWER} {$ENDIF}
Then you can compile the component as show in its documentation successfully.

Please drop your comment if you have issue.