Hello everybody!
Hope smbdy can help me with ridiculous problem: when I trying to open an XLS file in linux - everything works just fine, but in windows the same part of code gives me an error, it says that I'am trying to load an unsupported file format. I said "ridiculous", because in "uses" section presents all needed things, including "fpsallformats".
part of "type" section of the program:
...
OD1: TOpenDialog;
WG1: TsWorksheetGrid;
...
part of "var" section of the program:
...
WB: TsWorkbook;
WS: TsWorksheet;
...
and the code to open file is:
...
if LowerCase(ExtractFileExt(OD1.FileName))='.xls' then
begin
WB:=TsWorkbook.Create;
WB.ReadFromFile(OD1.FileName); {windows gives me an error on this line}
WS:=WB.GetFirstWorksheet;
WG1.LoadFromWorksheet(WS);
end;
...
Did I miss smthg elementary? What am I doing wrong? Thnx in advance for your replies.