Wrong encoding with --convert from csv to xlsx

I try to use --convert with soffice.bin from *.csv (UTF-8,ASCII,WIN1251) to *.xlsx but I Have unreadable document on output

why in --infilter options I can not set source encoding for correct display document?

What is the command actually? Какую конкретно команду используете?

See Filter Options - Apache OpenOffice Wiki for CSV filter options, where you actually can set source encoding.

for create CSV in [win1251] I Use

c:\Program Files\LibreOffice\program>soffice.bin --headless --convert-to  "csv:Text - txt - csv (StarCalc):44,,34,1" r:\1.xlsx --outdir r:\3

for create XLSX

c:\Program Files\LibreOffice\program>soffice.bin  --headless --convert-to xlsx r:\3\1.csv --outdir r:\3

And in XLSX I have unreadable ISO 8859-1? How to set encoding of source file ?

Huh, you don’t even specify the encoding. Try something like that (for files in cp1251):

c:\Program Files\LibreOffice\program>soffice.bin  --headless --convert-to xlsx --infilter=CSV:44,34,34 r:\3\1.csv --outdir r:\3

Where 44 stands for , as the field delimiter, 34 stands for " as the text delimiter (as far as I can understand, this field cannot be empty even when you don’t use a delimiter), the second 34 stands for cp1251 as the input encoding.

c:\Program Files\LibreOffice\program>soffice.bin --headless --convert-to xlsx r:\3\1.csv --infilter=“44,34,1” --outdir r:\3convert R:\3\1.csv → r:\3\1.xlsx using filter : Calc MS Excel 2007 XML

I try use --infilter=“44,34,1” but result is the same - unreadable

Read my previous comment.

c:\Program Files\LibreOffice\program>soffice.bin --headless --convert-to xlsx --infilter=CSV:44,34,34 r:\3\1.csv --outdir r:\3

It works!
gabix thank you!