I have a Python script that ultimately creates a custom .xlsx file that I would then like to print when the script completes.
Throughout the process it creates a couple CSV files then organizes them and creates the .xlsx. I’ve tested a few methods and I’m able to print the CSV files pretty easily with the os.system method:
os.system(‘lpr -P name_of_printer test.csv’)
However, when I try to use the same method with my xlsx file I get the following error:
lpr: Unsupported document format
I’ve looked at multiple solutions on here, but nothing addresses the Linux issue, only Windows and MacOS. This is for a pet project so it doesn’t need to be pretty, just functional, and I need it to retain the custom formatting of the .xlsx file. Any crazy ideas or workarounds welcome. Thank you.