• R/O
  • SSH

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

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

Commit MetaInfo

Revision0746f8606531d826d2f292018cdb460922f2948c (tree)
Zeit2022-03-31 20:27:07
AutorLorenzo Isella <lorenzo.isella@gmai...>
CommiterLorenzo Isella

Log Message

A script to batch convert excel files to csv.

Ändern Zusammenfassung

Diff

diff -r 85ca4f584d47 -r 0746f8606531 Bash-scripts/convert_xlsx_to_csv.bash
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Bash-scripts/convert_xlsx_to_csv.bash Thu Mar 31 13:27:07 2022 +0200
@@ -0,0 +1,46 @@
1+#!/bin/bash
2+
3+# #convert pdf to png
4+
5+# FILES="*.pdf"
6+
7+# for F in $FILES
8+
9+# do
10+# newname=`basename "$F".pdf`
11+# echo $newname
12+# pdftoppm "$F" -rx 300 -ry 300 "$newname.png"
13+
14+# done
15+
16+
17+
18+FILES="*.xlsx"
19+
20+for F in $FILES
21+
22+do
23+# See https://stackoverflow.com/questions/2664740/extract-file-basename-without-path-and-extension-in-bash/26753382#26753382
24+
25+fbname=$(basename "$F" | cut -d. -f1)
26+
27+newname=`basename "$F"`
28+echo $newname
29+echo $fbname
30+
31+# pdftoppm "$F" -rx 300 -ry 300 "$newname.png"
32+xlsx2csv "$F" "$fbname.csv"
33+done
34+
35+
36+
37+# FILES="*.xlsb"
38+
39+# for F in $FILES
40+
41+# do
42+# newname=`basename "$F"`
43+# echo $newname
44+# # pdftoppm "$F" -rx 300 -ry 300 "$newname.png"
45+# soffice --convert-to csv --outdir text_conversion/ $newname
46+# done