Is it possible to embedded a Sqlite database into an excel 2007 file (zip archive)

前端 未结 4 1979
星月不相逢
星月不相逢 2020-12-21 01:37

I\'m working on an excel application that requires a database back end. My preference is to use SQLite 3 and to make this as seamless and portable as possible for the end us

4条回答
  •  隐瞒了意图╮
    2020-12-21 02:01

    Excel rewrites the file every time it is saved, so your own added file would be deleted. Furthermore, there is no SQLite driver that can access database files inside of zip archives.

    You would have either to ship the database file alongside with the Excel file, or to recreate the database with a list of SQL commands when your application detects that the DB file is missing.
    This still requires that some SQLite (ODBC) driver is installed on the user's machine.

    The most seamless and portable way to store data in an Excel file is to store it in an Excel sheet, as mentioned by Remou. However, it's possible that the ADO driver will refuse to open the file when it's already open in Excel, so that you have to use Excel functions to access the data.

提交回复
热议问题