Python/Django excel to html
Okay, so what I want to do is upload an excel sheet and display it on my website, in html. What are my options here ? I开发者_如何学编程've found this xlrd module that allows you to read the data from spreadsheets, but I don't really need that right now.
Why don't you need xlrd? It sounds like exactly what you need.
Create a Django model with a FileField that holds the spreadsheet. Then your view uses xlrd to loop over the rows and columns and put them into an HTML table. Job done.
Possible complications: multiple sheets in one Excel file; formulas; styles.
Use Zoho Viewer in your template.
For example:
<iframe src="http://viewer.zoho.com/api/urlview.do?url=http://www.iasted.org/conferences/formatting/Presentations-Tips.ppt&embed=true"
style="width:300px; height:300px;" frameborder="0">
</iframe>
精彩评论