是否可以在Excel中显示Google地球图? [英] is it possible to display a Google Earth map INSIDE Excel?

查看:411
本文介绍了是否可以在Excel中显示Google地球图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法使用Excel 2007可用的脚本来在表单中显示Google地球图?



我已经使用Excel来存储数据,然后,我们已经生成了一个KML文件,以加载到Google地球,但现在他们希望看到一个很小的单元格,客户端地址直接映射到Excel中,以便完美地呈现。

解决方案

Microsoft确实有一个我以前使用过的ActiveX Web浏览器控件,而Panji解释了如何在excel中创建Web浏览器控件



Panji Tengkorak
如果您要查找的是根据需要显示html表,而不需要稍后计算该值,则可以使用WebBrowser控件,这样可以在页面上添加WebBrowser控件:


  1. 在Excel中,在设计视图中打开窗体。

  2. 右键点击菜单栏,然后​​单击控制工具箱。

  3. 在工具箱中,单击更多控件工具。出现一个菜单,列出系统中所有已注册的ActiveX控件。

  4. 在ActiveX控件的菜单上,单击Microsoft WebBrowser Control。


  5. 将控件移动到您要显示的区域,并将其调整大小

然后把这行代码放在你想要的地方,它可以在一个按钮或你的工作簿事件上。在以下示例中,我使用按钮单击:

  Sub Button3_Click()
ThisWorkbook.ActiveSheet.WebBrowser1.Navigate2http ://maps.google.com/maps F = q&安培;源= s_q&安培; HL = EN&安培;地址解析=安培; q =面积+ 51&安培; SLL = 37.0625,-95.677068&安培; SSPN = 31.839416,60.732422&安培,即= UTF8& ll = 37.237811,-115.807614& spn = 0.015614,0.029655& t = h& z = 15
End Sub

从电子表格中获取坐标到url应该比较简单。


Is there any way, using the scripting available to Excel 2007 to display a Google Earth map inside a sheet?

I've used Excel to house the data that I've then gone and generated a KML file to load into Google Earth, but now they want to see a pretty little cell with a client address mapped out in Excel directly to pretty up the presentation.

解决方案

Microsoft does have an ActiveX webbrowser control that I've used in the past and as Panji explainshow to create a web browser control in excel

Panji Tengkorak If what you're looking for is to display the html table as it is without the need to calculate the value later you can use WebBrowser Control, do this to add the WebBrowser control on a Sheet:

  1. In Excel open the form in Design view.
  2. Right-click the menu bar and then click Control Toolbox.
  3. In the toolbox, click the More Controls tool. A menu appears that lists all the registered ActiveX controls in your system.
  4. On the menu of ActiveX controls, click Microsoft WebBrowser Control.
  5. On the sheet, click where you want to place the control.
  6. Move and size the control to the area you want to display

Then put this line of code anywhere you want it, it can be on a button or on your workbook event. In the following example I use button click:

Sub Button3_Click()
    ThisWorkbook.ActiveSheet.WebBrowser1.Navigate2 "http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=area+51&sll=37.0625,-95.677068&sspn=31.839416,60.732422&ie=UTF8&ll=37.237811,-115.807614&spn=0.015614,0.029655&t=h&z=15"
End Sub

It should be relatively simple to get coordinates from the spread sheet into the url.

这篇关于是否可以在Excel中显示Google地球图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆