DrShepard
-
Content Count
7 -
Joined
-
Last visited
Posts posted by DrShepard
-
-
On 2/9/2021 at 9:22 PM, Attila Kovacs said:@Rollo62 right, libreoffice can convert
"C:\Program Files\LibreOffice\program\soffice.exe" --convert-to xlsx "C:\input_path\file.xls" -outdir "C:\output_path"
This method doesn't work in cycle.
uses Winapi.Windows, Winapi.ShellApi, System.SysUtils; var Command: PWideChar; SearchRec: TSearchRec; XLSdir, XLSXdir: string; begin try XLSdir := ExtractFilePath(ParamStr(0)) + 'xls'; XLSXdir := ExtractFilePath(ParamStr(0)) + 'xlsx'; if FindFirst(XLSdir + '\*.xls', faAnyFile, SearchRec) = 0 then repeat if (SearchRec.Name = '.') or (SearchRec.Name = '..') then continue; WriteLn(SearchRec.Name); Command := PChar('/c ""C:\Program Files\LibreOffice\program\soffice.exe" --convert-to xlsx "' + XLSdir + '\' + SearchRec.Name + '" -outdir "' + XLSXdir + '""'); ShellExecute(GetModuleHandle(nil), 'open', 'cmd.exe', Command, nil, SW_HIDE); Sleep(1000); until FindNext(SearchRec) <> 0; except on E: Exception do Writeln(E.ClassName, ': ', E.Message); end; Write(#13#10 + 'press any key to continue...'); ReadLn; end.
-
I 'm looking for freeware solution, that's why TMS is not my way
-
Hello! I need to convert xls-file to xlsx-file without OLE. Any ideas?
-
The problem was solved) Topic is not actual anymore
-
11 minutes ago, emailx45 said:in short: you can use BaloonHint for simulate this
see sample in StackOverFlow and adapt it for you case
I know about TBalloonHint component, but I want to make system hint as I said. See attach again.
-
FireDAC with multiple SQL
in Databases
Posted · Edited by DrShepard
Hello!
I am trying to execute multiple SQL statements at once in an anonymous block of code. I am using FireDAC and Postgres database. When I set the parameters, I get an error on execution: 'Parameter 'p_val1' not found'
https://pastebin.com/dPRB8T3d
I tried TFDСommand and TFDScript objects, but it didn't help. What am I doing wrong?