0

I want to know if it is possible to export each row from ODS file to .csv files. For example :

       column1      column2

row1   name         info for the row1

row2   name         info for the row2 ... and so on.

I want the exported filename to be the names from column1 and the content to be the info from column2.

Is that possible ?

tohuwawohu
  • 13,268
  • 4
  • 42
  • 61

2 Answers2

0

To get Calc to save as .csv, each set of information needs to be on a separate sheet, not just in separate rows. I do not think it would be convenient to do this, and in any case, that will not automatically save with the correct file names.

However what you are asking can be done by creating a Python or Java macro, or perhaps JavaScript. The macro would need to read each row, and then open a file for writing with the name from column 1.

It is possible with Basic as well, but file handling in Basic is awkward.

For a good macro reference, see Andrew Pitonyak's macro document.

Jim K
  • 12,824
  • 2
  • 22
  • 51
  • No so simple ... was thinking also to do some psd batch in Photoshop using data variables imported from .csv and the convert them to pdf and then to .txt :P pretty complicated situation. Also pdf2txt conversion don't work always so well (some extra lines are generated). Probably InDesign will do the job. – Ionita Cristian-Valentin Jul 20 '16 at 12:12
0
  1. Prepare sheet with 2 columns:
  • file name
  • content of the file
  1. Concatenate string "echo>" with file name in the first column
  2. Save this sheet in .CSV format, bat with .BAT extension. In Windows it makes executable file.
  3. Execute this batch file in terminal (command line interface). You should first change to proper directory.
  4. DONE