简体   繁体   English

如何在Mac Excel 2011上创建Web查询?

[英]How to create web query on Mac Excel 2011?

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" “未安装Microsoft Query”

I have searched every where but could not find the solution. 我搜索了所有地方,但找不到解决方案。 Please help me out.. 请帮帮我..

The process is a bit different on the mac. 在Mac上,此过程有些不同。

  1. In the Finder, go to /Applications/Microsoft Office 2011/Office/Queries 在Finder中,转到/ 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 另存为新文件并保存在相同的Queries文件夹中
  5. In Excel, go to Data > Get External Data > Run Saved Query 在Excel中,转到“数据”>“获取外部数据”>“运行保存的查询”
  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: 因此,例如,要提取Google搜索“ tacos”的结果,可以创建一个如下所示的文本文件并将其保存在Queries文件夹中:

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

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

I noticed that some people could't find the queries. 我注意到有些人找不到查询。 Queries examples are automatically downloaded when you install MS Office 2011 for Macs. 当您安装Mac的MS Office 2011时,会自动下载查询示例。 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) 右键单击Finder图标(通常是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 在弹出窗口的左上角,您将看到“搜索:”,以及一个空格,用于键入您要在Mac中查找的内容
  4. Type “MSN MoneyCentral Currencies” (excluding the quotes). 键入“ MSN MoneyCentral货币”(不包括引号)。 “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) “ MSN MoneyCentral货币”是自动安装的查询之一,因此它应在找到的项目的正文中列出(如果您碰巧有多个同名文件,则可能会出现其他文件)
  5. Click on the file 点击文件

The bottom of the Smart Finder window will display its location (folder tree). Smart Finder窗口的底部将显示其位置(文件夹树)。

Both jonaz's method and User 2413421's reference at dummies.com work for me if the query file is in SimpleText Format, ie MS-DOS plain text with CR/LF line delimitation. 如果查询文件为SimpleText格式(即带有CR / LF行定界的MS-DOS纯文本), 那么 jonaz的方法和dummies.com上的User 2413421的引用都对我有用。 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. 当我以Mac OS纯文本格式保存文件时,该文件在“ Excel运行保存的查询”对话框中显示为灰色,因此无法选择。 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. 我还没有找到一种从Pages或TextEdit中以MS-DOS格式保存的方法,但是在Word for Mac 2011中很容易做到。我的查询在没有dummies.com中描述的.iqy后缀的情况下也可以正常工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM