• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 448
  • Last Modified:

Excel - ODBC Refresh Question

I had created an Excel report that connects to an ODBC to pull data from SQL.  When I refresh, I would like to remove items from the Excel spreadsheet and re-populate with all new data.  Is this even possible?

The issue, I'm currently running into is that the ODBC would pull new data, and old data that should not be on the report any more are still there.  Not sure if this is a setting thing in Microsoft Excel 2010 or what.  I can't quite recalled, but didn't seem to be doing this when it was originally setup in Excel 2003.
  • 2
1 Solution
If you have a table based upon a query (set up using MS Query) the behaviour you want should be there... just right click the data and click refresh... this will remove all old data and replace with new data.

How does the Data get from the ODBC to the sheet?
holemaniaAuthor Commented:
It used to cleared it with Excel 2003.  However, just recently and not sure because of the different version of Excel (excel 2010), but lately it's not doing that.

I am connecting to an ODBC through MS Query to pull the information.  This used to clear out any records that should not be in the output, but for some reason, it's not doing that any more.

Example, when I run the query in the MS Query designer I get 100 lines.  If I send this back to my excel spreadsheet, there would be like 5 lines still left there from the last refresh and would not remove it.

As a workaround, I would have to delete everything and then refresh my excel file.  If I do this, then it brings in only those 100 lines.  Just wanted to know if something else could've cause it not to update/refresh correctly.
holemaniaAuthor Commented:
Deleted the excel worksheet and recreated the new odbc.  Seems to had fixed it.  Thanks.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now