我們的品牌

Impact-Company-Logo-English Black-01-177x54

歡迎造訪施耐德電機全球網站

歡迎訪問我們的網站
		
我们今天能为您提供什么帮助?
Schedule an update of an excel sheet query to occur at a specific interval.

Goals and Symptoms

Goal:
Having learned to import data into an Excel spreadsheet using the procedure in http://www.powerlogic.com/kbarticle.cfm?myrequest=RESL182688 AND viewing. If you would then like the query to update on a scheduled interval (e.g. every 15min) follow the procedure below.

Causes and Fixes

Automatic Scheduled Update Of Your Excel Sheet Query.

(This procedure starts assuming the query already exists in excel)

    • 1) Put your cursor inside the contents of the database query in your spreadsheet; that should cause the External Data toolbar to pop up.  If it does not pop up you will need to click on View > Toolbars > External Data.


    • 2) Record the macro.  Select an Excel cell on the same sheet outside the database query range (If you fail to do this, and your cursor happens to be inside the data range, the macro wont work properly).  Turn on the macro recorder by clicking on Tools > Macro > Record New Macro.


    • 3) Select a name for the macro and type it in the Macro Name box and click OK.  That should engage the Stop Recording toolbar.  If it doesnt click View > Toolbars > Stop Recording.


    • 4) Select a cell in the database query range and click on the Refresh button (Orange Exclamation Point) on the External Data toolbar (let it run through its process) and then click on the Stop button on the Stop Recording toolbar.

      5) Now that weve recorded a macro we need to edit it to automatically update itself on a scheduled basis.  Type Alt + F11 in the excel window to bring up the macro code.



    • 6) You will now want to add the following lines of code to the macro right beneath the first line (You can change the TimeValue to the update interval you would like, right now it updates every 15min)(MyMacro should be the name of the macro and in this case should be change to Macro5):

    dTime = Now + TimeValue("00:15:00")
    Application.OnTime dTime, "MyMacro"

    • 7) Click on the Run button (Green play button) in the Debug toolbar or at the top.

Now your macro should update the spreadsheet at your scheduled interval.

  • Last Revised: May 2008

    Applies To: ION Enterprise 5.6, 5.5, and 5.0

    Original Author: MN

    Public

    All content © 1992-2008 Schneider Electric


Legacy KB System (APS) Data: RESL192086 V1.0, Originally authored by KBAdPM on 06/05/2008, Last Edited by KBAdPM on 06/05/2008
Related ranges: OS & related Third Party PRODUCTS for Power Mangement Systems, ION Enterprise V5.6, ION Enterprise V5.5, ION Enterprise V5.0

施耐德電機Taiwan

  • 產品文檔
  • 軟體下載
  • 產品選型工具
  • 產品替代和替換
  • 幫助和聯絡中心
  • 尋找我們的辦公室
  • 取得報價
  • 施耐德電機社群
  • 人才招募
  • 公司簡介
  • 舉報不當行為
  • 無障礙
  • 新聞中心
  • 投資者
  • 專業洞察
  • 台灣施耐德電機學院
  • 綠色影響力落差調查
  • Schneider Go Green 2025
  • 隱私政策
  • Cookie通告
  • 使用條款
  • Change your cookie settings