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

  • Home
  • SEARCH
  • 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 8105251
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T00:06:51+00:00 2026-06-06T00:06:51+00:00

I’m using Excel 2010 to read some SQL data using an ODBC data connection.

  • 0

I’m using Excel 2010 to read some SQL data using an ODBC data connection. To do this, I have .odc connection files which I can access through the “Data” tab and the “Existing Connections” button. Excel finds the ODC files, and it can retrieve data from them just fine. Microsoft Query can also edit the queries no problem.

The problem, and also the reason I chose .odc-files, is that I’d like to be able to change the underlying data source of the queries and also the queries themselves. You see, this data is simulation output that I’m further processing in Excel; the simulator outputs an SQLite database. I regularly make changes in the simulator to fix bugs, then do a rerun to obtain new data. The output format (i.e., table structure and format and all that) is the same, it’s just the data that’s different.

Hence, the idea is to be able to just edit the .odc-file to use a database with newer simulation results, hit refresh in Excel, and be done with it (the .odc files contain both the connection string and the SQL string). After working through the horribly bugged “always use this connection” checkbox, I’ve found that Excel will pick up on any edits to the connection string (i.e., changing the database file), but it refuses to pick up on any changes to the SQL.

Granted, edits to the SQL query shouldn’t happen that often, but they do happen occasionally. It’s not uncommon for me to do some calculations in SQL instead of afterwards in Excel, because frankly mixing “live” DataTable columns (or whatever it’s called) and “regular” derived columns sounds like a world of hurt. As I make mistakes in these calculations, though, I’d like to update them, which means updating the SQL.

So apparently Excel will read the connection string from the ODC file, but will happily ignore the SQL query in it and (I presume) store it in the XLS file instead. I can only imagine the horror if you’re in a company setting and have some analysis queries or something stored in ODC files, only to discover that you get to make the changes manually on every single computer company-wide.

Am I doing something wrong, or is this the intended behaviour? Is there a way to get Excel to actually use the SQL from the ODC files instead of always using its local version?

  • 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-06T00:06:52+00:00Added an answer on June 6, 2026 at 12:06 am

    A few things:

    Part 1
     - Create a template .ODC file.  
        - Create a connection Data tab, From Other Sources, follow the wizard, connect to the DB and data table.
     - Go to the Data tab, Connections and set the connection properties that you want.
     - Export the connection
    
    Part 2
     - Create the working SQL query for SQLite that produces the desired results
     - Put the entire SQL query on one line (odc files like everything on one line, don't ask)
    
    Part 3
     - Right click on the .odc file, use 'Open with' and open it in notepad or notepad++ (NOT WORD)
     - Look for <odc:CommandText> </odc:CommandText>
     - Remove the text that is there and paste your one line query between the commandtext tags
     - Save the .odc file
     - Double click on the .odc file and see if the data opens/appears in Excel
    
    Don't forget to double check to make sure the data in the <odc:ConnectionString> </odc:ConnectionString> is correct.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some data like this: 1 2 3 4 5 9 2 6
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have thousands of HTML files to process using Groovy/Java and I need to
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I have a text area in my form which accepts all possible characters from

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.