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 xlrd pdfkit
sudo apt-get install wkhtmltopdf