QXlsx icon indicating copy to clipboard operation
QXlsx copied to clipboard

Csv Export: Restructure saveAsCsV() function

Open erjoh001 opened this issue 5 months ago • 0 comments

I wanted to export out of a document with a few sheets the single sheets as csv. There i struggled with some issues:

  1. the definition of the csvFileName is based on the sheetName and an underscore. There is no way to give the csv-File an completely new name without this both components.
  2. the delimeter is hard coded. Sometimes you want to change it.
  3. the function is looping through all sheetNames. Actually there is no way to select a singleSheet and just write this to a csv.

Suggestions:

  1. adding a bool to give the oportunity for setting a fixed Name, if false use the existing logic.
  2. adding an argument for the delimeter that is passed to write.csv(delimeter)
  3. if there is an activeSheet which was set with document.setActiveSheet() use this for the csv-Export and dont loop through all sheets.

erjoh001 avatar Jun 24 '25 13:06 erjoh001