Refresh XML data from web in Excel -


i'm using excel 2010 link table xml file on server. i'd distribute excel file group of people , have updated every time xml file updated on server.

in excel, i'm pulling data using "data", "from web" , type in path of xml file.

excel builds table data if xml file updated on server, data remains static, if click "refresh" or "refresh xml data" on table.

it should able download new data including new columns table, if any.

is there way this?

i not expert in vba , here 1. refreshing when opening excel file , can done by

sub refreshdata()     activeworkbook.refreshall ' or can give specific workbook , worksheet identification end sub  private sub workbook_open() 'call refresh data subroutine when opening file refreshdata  end sub  
  1. you can use worksheet activate event handler if have multiple worksheet in file.

    private sub worksheet_activate()
    'call refresh data subroutine when opening file refreshdata
    end sub

  2. updating msexcel server gets update , doesn't make sense data available view after file gets open , if macro been used live monitoring , kept open 24 hours instead of sending event server , catching in vba , suggest implement polling every day/hour/minute/second ( call refresh @ poll interval) depending upon refresh requirement criticality.

    dim timetorun

    sub auto_open() call schedulerefresh end sub

    sub schedulerefersh() timetorun = + timevalue("00:00:10")

    application.ontime timetorun, "xmlrefersh" 

    end sub

    sub xmlrefresh()

    'call refresh data subroutine when opening file refreshdata call schedulerefresh end sub

    sub auto_close() on error resume next application.ontime timetorun, "xmlrefresh", , false end sub


Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -