• R/O
  • SSH

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

File Info

Révision 0746f8606531d826d2f292018cdb460922f2948c
Taille 729 octets
l'heure 2022-03-31 20:27:07
Auteur Lorenzo Isella
Message de Log

A script to batch convert excel files to csv.

Content

#!/bin/bash

# #convert pdf to png

# FILES="*.pdf"

# for F in $FILES

# do
# newname=`basename "$F".pdf`
# echo $newname
# pdftoppm "$F" -rx 300 -ry 300 "$newname.png"

# done



FILES="*.xlsx"

for F in $FILES

do
# See https://stackoverflow.com/questions/2664740/extract-file-basename-without-path-and-extension-in-bash/26753382#26753382
    
fbname=$(basename "$F" | cut -d. -f1)
   
newname=`basename "$F"`
echo $newname
echo $fbname

# pdftoppm "$F" -rx 300 -ry 300 "$newname.png"
xlsx2csv "$F"   "$fbname.csv"
done



# FILES="*.xlsb"

# for F in $FILES

# do
# newname=`basename "$F"`
# echo $newname
# # pdftoppm "$F" -rx 300 -ry 300 "$newname.png"
# soffice --convert-to csv --outdir text_conversion/ $newname 
# done