Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8818915
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T05:13:27+00:00 2026-06-14T05:13:27+00:00

I’m working on an excel application that requires a database back end. My preference

  • 0

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 user.

Recently I have learned that an Excel 2007 file is simply a zip archive with a xlsm extension. My question is this, can I store my back-end SQLite 3 database in the Zip archive and use ODBC to interact with the database. If so, can anyone point me to some background information, articles, guidance on achieving this objective. Are there any downsides to this approach or a better alternative I should know about.

Thanks for your input.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T05:13:28+00:00Added an answer on June 14, 2026 at 5:13 am

    Some notes. So far, no one has complained that the file does not open. Note that the Excel file is saved before the ADO code is run.

    Very hidden:

    ThisWorkbook.Worksheets("Courses").Visible = xlVeryHidden
    ThisWorkbook.Worksheets("System").Visible = xlVeryHidden
    

    A snippet of code:

        Const gCN = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source="
    

    <…>

    Set rs = CreateObject("ADODB.Recordset")
    Set cn = CreateObject("ADODB.Connection")
    Set fs = CreateObject("Scripting.FileSystemObject")
    
    scn = gCN & ThisWorkbook.FullName _
    & ";Extended Properties=""Excel 8.0;HDR=Yes;"";"
    
    cn.Open scn
    
    ''If they do not have an ID, they do not exist.
    
    sSQL = "SELECT ID,FirstName,LastName, " _
    & "CourseName,AdditionalText,Format(ExpiryDate,'dd/mm/yyyy') As ExpiryDate " _
    & "FROM [Applicants$] WHERE DateCancelled Is Null AND ID Is Not Null " _
    & "AND (FirstName Is Null OR LastName Is Null Or CourseName Is Null " _
    & "Or ExpiryDate Is Null) " & sWhere
    
    rs.Open sSQL, cn
    

    References:

    Excel ADO
    Connection strings

    Most of the methods available to Jet can be used with Excel

    Fundamental Microsoft Jet SQL for Access 2000
    Intermediate Microsoft Jet SQL for Access 2000
    Advanced Microsoft Jet SQL for Access 2000

    Edit re Comments

    I did not find the leak particularly bad, but I did not run many iterations, and this is quite a good machine.

    The code below uses DAO, which does not cause a memory leak.

    'Reference: Microsoft Office 12.0 Access Database Engine Object Library
    Dim ws As DAO.Workspace
    Dim db As DAO.Database
    Dim rs As DAO.Recordset
    Dim sDb As String
    Dim sSQL As String
    
    sDb = ActiveWorkbook.FullName
    
    Set ws = DBEngine.Workspaces(0)
    Set db = ws.OpenDatabase(sDb, False, True, "Excel 8.0;HDR=Yes;")
    
    sSQL = "SELECT * FROM [Sheet1$];"
    Set rs = db.OpenRecordset(sSQL)
    
    Do While Not rs.EOF
        For i = 0 To rs.Fields.Count - 1
            Debug.Print rs.Fields(i)
        Next
    
        rs.MoveNext
    Loop
    
    rs.Close
    db.Close
    ws.Close
    
     'Release objects from memory.
    Set rs = Nothing
    Set db = Nothing
    Set ws = Nothing
    

    Acknowledgement: http://www.ozgrid.com/forum/showthread.php?t=37398

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I know there's a lot of other questions out there that deal with this
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
Let's say I'm outputting a post title and in our database, it's Hello Y&#8217;all
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
this is what i have right now Drawing an RSS feed into the php,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.