Created
November 1, 2014 23:45
-
-
Save ikks/2fd23c9241a6b768da56 to your computer and use it in GitHub Desktop.
Converts an xls xml table to csv. Usually those files are in iso-88859-1 in a one long line, with this you can convert them to a psv. Requires iconv and sed
This file contains hidden or 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
iconv -f iso-8859-1 -t utf-8 INPUTFILE | sed 's%^.*<table>%%g;s%</table>%%g;s% x:str%%g' | sed 's%<tr><td>%%g;s%</td><td>%|%g;s%</td></tr>%\n%g' > OUTPUTFILE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment