When I modify an existing Excel workbook containing web queries, any new web queries I add will work fine until I save and reopen the document. When I reopen, suddenly all tables return the same data because (somehow) the query
parameter for the new queries has been replaced with the first query added to the document.
I.e., when I reopen the document and review the query parameters, they all look like this:
So I decided to explore the XML inside the xlsx workbook to see what was going on. Turns out all my new queries are there in the /xl/queryTables/
path but they all reference the same data connection (connections are referenced by id
number), and alas, /xl/connections.xml
has no mention of the new data connections I created.
So then I thought I would be clever and just create some new nodes in connections.xml
then reference the correct connections by their corresponding id
. Unfortunately Excel decided this was no good and decided to "repair" my workbook by breaking it back to the broken way it was before.
Does anyone know of a fix, hack or workaround? There must be some way to get new queries to save in a workbook.
[My Environment]: Excel Mac 2011 Version 14.2.4 (120824) - latest build as of writing; MacOS Mountain Lion 10.8.2.