0

I'm trying to convert a xls(x) file to csv in C++ using QProcess::start()

QProcess *myProcess = new QProcess();
myProcess->start("path/xls2csv.exe fileName.xlsx > fileName.csv");

There is no error message, but nothing happens.

When I start the xls2csv in cmd with the Line:

xls2csv.exe fileName.xls > fileName.csv

Everything works fine.

I also tried to attach the file names in a QStringList as argument, but that doesn't work either.

The Excel File is in the same directory like the xls2csv.exe.

I appreciate any help!

PlaZm0
  • 25
  • 1
  • 5
  • Is fileName.xlsx and fileName.csv exist at running path? Or it`s located at xls2csv path? – progpow Feb 19 '16 at 14:42
  • fileName.xlsx is located at xls2csv path, fileName.xsv isn't created yet. It should be created when I run the executable – PlaZm0 Feb 19 '16 at 14:58
  • change you code to `myProcess->setWorkingDirector("PATH_XLS2CSV"); myProcess->start("xls2csv.exe fileName.xlsx > fileName.csv");` – progpow Feb 19 '16 at 20:41

0 Answers0