free counters
Diberdayakan oleh Blogger.

Minggu, 12 Juni 2016

Mass convert OpenDocument like odf and ods to excel

by Unknown  |  in Script at  Minggu, Juni 12, 2016

It turns out that we can use LibreOffice to mass convert OpenDocument, such as odf, ods, or etc, to other format. What I need is to mass convert ods files to xls. We just need a single line to convert a file.
 For example, when we want to convert file.ods to file.xls on current folder, we use the following line in bash:

 soffice --headless --convert-to xls file.ods  
To mass convert all file in current folder, use the following code:
 for i in *.ods;   
  do soffice --headless --convert-to xls "$i" ;   
 done  
Sample code can be found in https://github.com/joielechong/collection_of_script under bash folder.

0 comments:

Silahkan tinggalkan komentar anda: