How to convert specific sheet in xlsx file to csv file?

Hi All,

I am using libreoffice5.2 --headless --convert-to csv --outdir outputdirectory input_xlsxfile to convert xlsx file to csv file.Here i am facing a issue, if i use mentioned command it is converting first sheet(tab) of xlsx file to csv. my targeted xlsx file has may tabs.do you have any clue how to convert targeted sheet(tab) of xlsx file into csv file. for example if i want to convert 3rd sheet(tab) of xlsx file to csv file how to do that.

-hanumant.

You can’t from the command line. The command line conversion always converts the first sheet.

Update 2020-05-07T18:16+02:00

Probably this macro helps, specifically the For Each loop that imports files and saves each sheet to CSV. Adjust to your needs.

Update 2022-06-24

Just coming back to this… meanwhile, since LibreOffice 7.2 there’s a parameter to the --convert-to csv:... filter to specify which sheet to export (or all). See release notes.

is there any other way in linux systems?

or can we form each sheet of xlsx file to another(separate) xlsx file with its sheet name?