Back to Devexpress

TdxCustomSpreadSheet.LoadFromFile(string) Method

vcl-dxspreadsheetcore-dot-tdxcustomspreadsheet-dot-loadfromfile-x28-system-dot-string-x29.md

latest2.4 KB
Original Source

TdxCustomSpreadSheet.LoadFromFile(string) Method

Loads a spreadsheet document from the specified file.

Declaration

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

Parameters

NameType
AFileNamestring

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

TdxCustomSpreadSheet.SaveToFile

TdxCustomSpreadSheet.SaveToStream

TdxCustomSpreadSheet Class

TdxCustomSpreadSheet Members

dxSpreadSheetCore Unit