Is it possible to use Spreadsheet has a database to store data...I don't want to use any database externally, I want to use Python, Google Apps and spreadsheet only.
是否可以使用Spreadsheet有一个数据库来存储数据......我不想在外部使用任何数据库,我只想使用Python,Google Apps和电子表格。
For Example: using Python and Google Apps I have developed leave application form, on submit of that form I have to store that data in to spreadsheet instead of using any database (MySql or Oracle)
例如:使用Python和Google Apps我已经开发了离开申请表,在提交该表单时我必须将该数据存储到电子表格中而不是使用任何数据库(MySql或Oracle)
If its possible give me some reference code
如果它可能给我一些参考代码
Thanks in advance
提前致谢
2 个解决方案
#1
Whilst storing data in a spreadsheet might seem like a good idea at first, as your application gets more complicated you may come to regret it. If your data structures become more complicated - especially if you need relationships between tables - you'll be much better off with a database.
虽然首先在电子表格中存储数据似乎是个好主意,但随着您的应用程序变得越来越复杂,您可能会后悔。如果您的数据结构变得更加复杂 - 特别是如果您需要表之间的关系 - 那么使用数据库会更好。
My advice would be to use a database and then use The xlwt
module to convert your data into Spreadsheet format.
我的建议是使用数据库,然后使用xlwt模块将数据转换为Spreadsheet格式。
#2
I would recommend you store this data internally in a flat file or database and transform the data to the spreadsheet. Doing it this way will let you change with the future. If you use google apps spreadsheet, and the api changes even slightly, you could lose data. If you store in an xls spreadsheet, you might as well store in a flat file and export the data as that will be easier than reading/writing to a spreadsheet.
我建议您将这些数据存储在平面文件或数据库中,并将数据转换为电子表格。这样做可以让你改变未来。如果您使用谷歌应用程序电子表格,并且api稍有变化,您可能会丢失数据。如果您存储在xls电子表格中,您也可以存储在平面文件中并导出数据,因为这比读取/写入电子表格更容易。
Why do you want to do it this way?
你为什么要这样做呢?
#1
Whilst storing data in a spreadsheet might seem like a good idea at first, as your application gets more complicated you may come to regret it. If your data structures become more complicated - especially if you need relationships between tables - you'll be much better off with a database.
虽然首先在电子表格中存储数据似乎是个好主意,但随着您的应用程序变得越来越复杂,您可能会后悔。如果您的数据结构变得更加复杂 - 特别是如果您需要表之间的关系 - 那么使用数据库会更好。
My advice would be to use a database and then use The xlwt
module to convert your data into Spreadsheet format.
我的建议是使用数据库,然后使用xlwt模块将数据转换为Spreadsheet格式。
#2
I would recommend you store this data internally in a flat file or database and transform the data to the spreadsheet. Doing it this way will let you change with the future. If you use google apps spreadsheet, and the api changes even slightly, you could lose data. If you store in an xls spreadsheet, you might as well store in a flat file and export the data as that will be easier than reading/writing to a spreadsheet.
我建议您将这些数据存储在平面文件或数据库中,并将数据转换为电子表格。这样做可以让你改变未来。如果您使用谷歌应用程序电子表格,并且api稍有变化,您可能会丢失数据。如果您存储在xls电子表格中,您也可以存储在平面文件中并导出数据,因为这比读取/写入电子表格更容易。
Why do you want to do it this way?
你为什么要这样做呢?