简体   繁体   中英

How to write user inputs to an excel file?

How can I put user inputs into an excel file? I'm planning to ask the students' name, year, and program to make a "database" or list in excel. Is that possible?

You can easily write your data as.csv file using built-in csv module:

https://docs.python.org/3.8/library/csv.html

MS Excel will open those files

This option is the best in my opinion, as it requires no additional modules

If you really need to write.xls/.xlsx files - take a look at OpenPyxel:

https://openpyxl.readthedocs.io/en/stable/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM