pythoncsvexport-to-csvtabulaconvertto-json

how to convert pdf file to excel file using python


I want to convert a pdf file into excel and save it in local via python. I have converted the pdf to excel format but how should I save it local?

my code:

df = ("./Downloads/folder/myfile.pdf")
tabula.convert_into(df, "test.csv", output_format="csv", stream=True)

Solution

  • You can specify your whole output path instead of only output.csv

    df = ("./Downloads/folder/myfile.pdf")
    output = "./Downloads/folder/test.csv"
    tabula.convert_into(df, output, output_format="csv", stream=True)
    

    Hope this answers your question!!!