Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2025 07:24 AM
I was actually playing with this almost this exact issue last week in Databricks/Python.
I found xlsxwriter was really easy to set up - the simplest way was to just convert it to a table. The code in their example Pandas table is very simple to update: https://xlsxwriter.readthedocs.io/example_pandas_table.html
Not sure if you need the full table or can get away with
worksheet.autofit()
If you want to be very fancy, you can also specify column widths for each column. Since we're sending out Excel files for people to print, we did that so everything would be inside a standard page width.
If you want to be very fancy, you can also specify column widths for each column. Since we're sending out Excel files for people to print, we did that so everything would be inside a standard page width.