Excel as an output? #610
Replies: 3 comments
-
I have similar question with word. It would be really nice. |
Beta Was this translation helpful? Give feedback.
-
Will plans to support Excel output? |
Beta Was this translation helpful? Give feedback.
-
I don't have an answer to your question, but I will propose a workaround based on this excel thread - https://learn.microsoft.com/en-us/answers/questions/4780454/how-to-paste-html-table-into-excel. You can start by generating the html table, and then paste the html from within the A quick snippet of a workflow to get the appropriate html is to use re to match the outputted raw html to the correct tags. I've included import re
gt = GT(your_data)
raw_html = gt.as_raw_html(inline_css=True)
match = re.search(r'<table.*?>.*?</table>', raw_html, re.DOTALL)
table_html = match.group(0)
# Then copy the printed output, and paste it into excel.
# There is likely a way to export the html to excel directly, but I haven't poked around that far
print(table_html) I'm sorry I don't have a more native solution, but this will work for many basic tables with some styling. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi GT, really interesting project, congratulations!
Is there any way, or plan to support, to export formatted tables to excel?
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions