How to convert a Google Sheets-File to an Excel-File (XLSX)

Using the Drive API, we can get more information about files than is available through the DriveApp methods. Check out the file data, especially exportLinks. Those links contain the magic that will let us get an XLS file. (For fun, put a breakpoint after file is assigned, and check what information you have to play … Read more

Python – Converting XLSX to PDF

As my original answer was deleted and is eventually a bit useful, I repost it here. You could do it in 3 steps: excel to pandas: pandas.read_excel pandas to HTML: pandas.DataFrame.to_html HTML to pdf: python-pdfkit (git), python-pdfkit (pypi.org) import pandas as pd import pdfkit df = pd.read_excel(“file.xlsx”) df.to_html(“file.html”) pdfkit.from_file(“file.html”, “file.pdf”) install: sudo pip3.6 install pandas … Read more

Convert xlsx to csv in Linux with command line

The Gnumeric spreadsheet application comes with a command line utility called ssconvert that can convert between a variety of spreadsheet formats: $ ssconvert Book1.xlsx newfile.csv Using exporter Gnumeric_stf:stf_csv $ cat newfile.csv Foo,Bar,Baz 1,2,3 123.6,7.89, 2012/05/14,, The,last,Line To install on Ubuntu: apt-get install gnumeric To install on Mac: brew install gnumeric

Handling java.lang.OutOfMemoryError when writing to Excel from R

This is a known issue: http://code.google.com/p/rexcel/issues/detail?id=33 While unresolved, the issue page links to a solution by Gabor Grothendieck suggesting that the heap size should be increased by setting the java.parameters option before the rJava package is loaded. (rJava is a dependency of xlsx.) options(java.parameters = “-Xmx1000m”) The value 1000 is the number of megabytes of … Read more