Last active
December 25, 2016 06:32
-
-
Save ishiy1993/393fb1037f84e66e2bfb2db058c17eca to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
unzip hanshin.xlsx | |
cat xl/sharedStrings.xml | hxselect si -s '\n' | sed 's;</t.*;;' | sed 's;.*>;;' | awk '{print "s;s"(NR-1)";"$1";g"}' | tac > table | |
cat xl/worksheets/sheet1.xml | hxselect row -s '\n' | sed 's/<[^<]*>/ /g' | awk 'NR>1{print $1,"s"$2,"s"$3}' > temp | |
sed -f table temp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment