Reputation: 1
I have an excel sheet which i want to convert to Python. Need recommendation in suggesting package or a module for above query.
i have tried with PDFWriter. I am using pandas to read my excel file and inputing that dataset to PDFwriter to create pdf file. The output pdf seems blank.
import pandas as pd
from pdfrw import PdfWriter
wb = pd.read_excel('excel file path')
wb=PdfWriter()
wb.write('result.pdf')
The pdf file created in of 1kb only..
Upvotes: 0
Views: 20437
Reputation: 370
import pandas as pd
import pdfkit
df = pd.read_excel("file.xlsx")#input
df.to_html("file.html")#to html
pdfkit.from_file("file.html", "file.pdf")#to pdf
Upvotes: 1
Reputation: 3272
Here are few points :
You can also try this link.
Upvotes: -1