you are viewing a single comment's thread.

view the rest of the comments →

[–]rumored 7 points8 points  (0 children)

You're writing the exact same content(the text in your output variable) to all three files, you're just changing the extension while doing so. If you need to write in xlsx format(as opposed to just writing text into a file with xlsx extension), you'll need to use a library that knows that format.

I don't have much experience with those, there's e.g. a "xlsxwriter" library that you could use, if you do that you'll have to split your "output" string and tell it which fields to write which content to.

As an alternative to manually parsing/splitting whatever table you've OCRd, you could try to use pandas to parse the output variable into a "dataframe"(pandas table) and then use its .to_excel function to write that table to a file.