将csv/excel文件上传到appengine(python)进行处理
我需要能够将 excel 或 csv 文件上传到 appengine,以便服务器可以处理行并创建对象。任何人都可以提供或向我指出如何完成此操作的示例吗?感谢您的帮助。
I need to be able to upload an excel or csv file to appengine so that the server can process the rows and create objects. Can anyone provide or point me to an example of how this is done? Thanks for your help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可能想要上传到 Blobstore。然后读取数据并使用csv 模块。
您可能需要考虑将 Excel(和其他)格式的文件发送到 google 文档,然后通过 电子表格 API
Uploading to the Blobstore is probably what you are after. Then reading the data and processing it with the csv module.
You might want to look into sending your file to google docs in the case of excel (and other) formats then reading the rows back via the Spreadsheets API
如果您指的是一次性(或几次)传输,您可能正在寻找批量上传系统:http://code.google.com/appengine/docs/python/tools/uploadingdata.html
如果您在使用过程中谈论常规上传,则需要处理它们作为对应用程序的发布请求。
If you mean a one-off (or a few) transfers, you're probably looking for the bulk upload system: http://code.google.com/appengine/docs/python/tools/uploadingdata.html
If you're talking about regular uploads during use, you'll need to handle them as post requests to the application.