I'm building a workbook that will allow me to pull data from a web-based reporting tool I have at work, and I've run into a problem.
The links to the 7 different reports I am seeking to integrate into my spreadsheet via web query are static/relative. For example
Static:
http://myworkreportserver.ext/
Relative
user06
I've built a pretty simple Concatenate setup that allows me to pull the static pieces together with the relative information that is inputted via a dropdown list and vlookup function(s).
The links are all over 256 characters, so I've had to find a workaround as Excel isn't fond of long urls. I reasearched this problem online, and compiled a few different ideas to build a functional system. A macro that first opens a .txt file, then copies the updated link from the workbook into the .txt file. Following this, the .txt file is saved as an .iqy file.
The .txt file is closed (I did a dialogue box overwrite as it was tedious clicking yes to overwrite the file each time), then the original workbook opens the newly created/updated .iqy file to run the web query.
I have a system of cell references that format the data pulled into the workbook with the web query, and the 1st of 7 reports works flawlessly!
Now we get to the problem.
The first .iqy file saves in the perfect format, which is this:
WEB[cr]
1[cr]
http://myurlhere
The problem I am running into, is that the other 6 reports seem to save the .iqy file with quotation marks around the url, and this is causing Excel to not accept the webquery.
Any idea what may be causing the other report urls to be saved with quotation marks when the 1st report doesn't?
The links to the 7 different reports I am seeking to integrate into my spreadsheet via web query are static/relative. For example
Static:
http://myworkreportserver.ext/
Relative
user06
I've built a pretty simple Concatenate setup that allows me to pull the static pieces together with the relative information that is inputted via a dropdown list and vlookup function(s).
The links are all over 256 characters, so I've had to find a workaround as Excel isn't fond of long urls. I reasearched this problem online, and compiled a few different ideas to build a functional system. A macro that first opens a .txt file, then copies the updated link from the workbook into the .txt file. Following this, the .txt file is saved as an .iqy file.
The .txt file is closed (I did a dialogue box overwrite as it was tedious clicking yes to overwrite the file each time), then the original workbook opens the newly created/updated .iqy file to run the web query.
I have a system of cell references that format the data pulled into the workbook with the web query, and the 1st of 7 reports works flawlessly!
Now we get to the problem.
The first .iqy file saves in the perfect format, which is this:
WEB[cr]
1[cr]
http://myurlhere
The problem I am running into, is that the other 6 reports seem to save the .iqy file with quotation marks around the url, and this is causing Excel to not accept the webquery.
Any idea what may be causing the other report urls to be saved with quotation marks when the 1st report doesn't?
Last edited: