How to create web query on Mac Excel 2011?

2019-04-14 17:20发布

问题:

I am trying to import data from a website on my worksheet, but when I click on import data from a new database query, it shows an error of saying:

" Microsoft Query is not installed"

I have searched every where but could not find the solution. Please help me out..

回答1:

The process is a bit different on the mac.

  1. In the Finder, go to /Applications/Microsoft Office 2011/Office/Queries
  2. Open any file you see there in a text editor
  3. Replace the URL with your query URL
  4. Save as a new file back in that same Queries folder
  5. In Excel, go to Data > Get External Data > Run Saved Query
  6. Pick the file you just created from the list

So, for example, to pull the results of a Google search for "tacos", you could create a text file that looks like this and save in your Queries folder:

WEB
1
https://www.google.com/search?q=tacos

Selection=EntirePage
Formatting=RTF
PreFormattedTextToColumns=True
ConsecutiveDelimitersAsOne=True
SingleBlockTextImport=False
DisableDateRecognition=False
DisableRedirections=False


回答2:

I noticed that some people could’t find the queries. Queries examples are automatically downloaded when you install MS Office 2011 for Macs. If they are installed, one way to find an example is doing the following.

  1. Right Click on the Finder icon (usually the first icon on the Dock)
  2. Select “New Smart Folder” from the menu
  3. On the left top of the pop up window, you’ll see “Search For:”, and a space to type what you are looking for in your Mac
  4. Type “MSN MoneyCentral Currencies” (excluding the quotes). “MSN MoneyCentral Currencies" is one of the queries automatically installed, so it should list it on the body of the found items (other files may appear if you happen to have more than one with the same name)
  5. Click on the file

The bottom of the Smart Finder window will display its location (folder tree).



回答3:

Both jonaz's method and User 2413421's reference at dummies.com work for me if the query file is in SimpleText Format, i.e. MS-DOS plain text with CR/LF line delimitation. When I save the file in Mac OS Plain Text Format, it's greyed out in the Excel Run Saved Query dialog, and can't be selected. I haven't found a way to save in MS-DOS format from Pages or TextEdit, but it's easy enough to do in Word for Mac 2011. My queries work fine without the .iqy suffix described at dummies.com.