Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python

how to read excel file and insert the content in a table in mysql

I have a Excel File and I need to read all file and create a table and insert the information from file. the db is mysql

2 Answers

Try to save it as CSV and then that csv try to import into the db table.

Thanks and How I do that in python

without drilling into to much detail, are you using a GUI for you mySQL connection (phpmyadmin or hiedi or something like this) if so, you can simply save the Excel as a CSV file and import to your prebuilt table