My problem is that I have an Excel XLSX file with non-ascii sheet name (Общий отчет
) and I'm trying to convert it to CSV using in2csv tool. I run it from PHP using exec
function.
On my local machine (Windows 10 x64) it's workong OK. I'm trying to run it on the CsntOS x64 VDS, and when I start my PHP script (which uses exec
to call in2csv tool) from terminal - it works OK too. But when I run it from cron (php -f ./task.php
) - it produces no error but the resulting CSV file is blank!
I did some tests, checking user and group running PHP script, python default encoding, but still have no clue. Please help!
Here is the command to convert the file:
in2csv --locale ru_RU --sheet "Общий отчет" --encoding windows-1251 "prices.xlsx" > "prices.csv"