Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TdxCustomSpreadSheet.LoadFromFile(string) Method

Loads a spreadsheet document from the specified file.

#Declaration

Delphi
procedure LoadFromFile(const AFileName: string); virtual;

#Parameters

Name Type
AFileName string

#Remarks

Call this procedure and pass a path to the target spreadsheet document file as the AFileName parameter. The procedure can load documents in one of the following formats:

  • XLSX and XLTX (Office Open XML, modern Microsoft Excel® spreadsheet document format);

  • XLS and XLT (BIFF8 and newer; an old Microsoft Excel® spreadsheet document format);

  • ODS (OpenDocument, the LibreOffice/OpenOffice Calc default spreadsheet document format);

  • CSV (the comma separated values format);

  • The ExpressSpreadSheet binary format, a data stream, saved to a file.

A LoadFromFile procedure raises the OnProgress event multiple times; every time a file load process reaches another inner mark within the file. You can handle the event to track progress of lengthy file load processes.

To allow end-users to import spreadsheet document data from any supported file format, you can manually link the OpenDocument command to a UI element in your application or use the control’s automatic Toolbar or Ribbon UI generation feature.

See Also