This describes how you can convert an XML file to a simple HTML table. The table can then be copy/pasted into a Google Sheet for example for further manipulation.
brew install saxon
saxon -s:input.xml -xsl:stylesheet.xsl -o:result.html
| #!/bin/bash | |
| #run this first: chmod +x osx_install.sh | |
| #### | |
| echo Install AppStore Apps first as we cannot do this automatically! | |
| read -p "Press any key to continue... " -n1 -s | |
| echo '\n' | |
| #### | |
| echo Install Homebrew, wget cask and a few other apps |
| javascript: (function() { | |
| var enc = encodeURIComponent, | |
| w = window, | |
| frames = w.frames, | |
| d = document, | |
| ms = w.getSelection ? w.getSelection() : (d.getSelection) ? d.getSelection() : (d.selection ? d.selection.createRange().text : 0), | |
| mu = w.location.href, | |
| mt = d.title, | |
| subjSpans = d.getElementsByClassName('hP'), | |
| i, url; |
| tell application "Google Chrome" to tell active tab of front window to set the URL to " | |
| javascript: (function() { | |
| var enc = encodeURIComponent, | |
| w = window, | |
| frames = w.frames, | |
| d = document, | |
| ms = w.getSelection ? w.getSelection() : (d.getSelection) ? d.getSelection() : (d.selection ? d.selection.createRange().text : 0), | |
| mu = w.location.href, | |
| mt = d.title, | |
| subjSpans = d.getElementsByClassName('hP'), |
| javascript: | |
| (function() { | |
| var url = 'https://mail.google.com/mail/?view=cm&fs=1'; | |
| var emailInput = prompt('E-mail address',''); | |
| var subjectInput = prompt('Subject',''); | |
| if (emailInput) { | |
| url += '&to=' + escape(emailInput); | |
| } | |
| if (subjectInput) { | |
| url += '&su=' + escape(subjectInput); |
| /* | |
| * Setttings | |
| */ | |
| // Google Drive Folder ID which contains the Excel files you want to convert | |
| var driveFolderId = ''; | |
| // Folder name in which we should place the original files after conversion | |
| var sourceFilesFolderName = 'Source Files'; | |
| /* | |
| * Datasource: public Google Spreadsheet with internet user data: | |
| * https://docs.google.com/spreadsheets/d/1uxPf0einHJxZqkTvXnFto0O8Q4Lxw9RBPKoBCV2idTE/edit | |
| * | |
| * In the example below, we expect one or more country codes (ISO 3166-1 alpha-2), separated by a pipe (|), in cell A2 | |
| */ | |
| = | |
| SUM( | |
| QUERY( | |
| IMPORTRANGE("1uxPf0einHJxZqkTvXnFto0O8Q4Lxw9RBPKoBCV2idTE";"Data!B:C"); |
| =TRIM(RIGHT(SUBSTITUTE(A2;"/";REPT(" ";100));99)) |
| <tag>[\s\S]*?</tag> |
| /** | |
| * Set of functions to import CSV files into a Google Sheet | |
| * Imports CSV as text, freezes the first row, sets it bold and removes empty rows and columns. | |
| */ | |
| var settings = { | |
| CSVFolderID: '', | |
| singleFileID: '', | |
| CSVSeparator: ';' | |
| } |