Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Re-using Web Query Data

Hi All,

I'm using a web-query (programmatically) to insert data into a few
worksheets from an intranet site (WAN). I always access the same page but
just download different tables into different worksheets. The web-page is
pretty large so opening it takes some time, it appears to me that Excel
isn't doing any caching and re-opens the page for each new worksheet. This
is a cut down version of the code:
....
ConnectString = URL; http://blahblahblah/someapp/somepage... you get the
idea.
....
For Each tableName In tableList

' Do the query and add the worksheet.
'
'
Set thisSheet = ActiveWorkbook.Worksheets.Add
With ActiveSheet.QueryTables.Add(Connection:=ConnectStr ing,
Destination:=Range("A1"))
.Name = tableName
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = False
.RefreshOnFileOpen = True
.BackgroundQuery = True
.RefreshStyle = xlOverwriteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingRTF
.WebTables = tableName
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.Refresh BackgroundQuery:=False
End With

Next
....

As you can see noddy stuff, just opens and squirts a specific table into the
worksheet. Is there anyway I can re-use the web-query data, rather than
forcing a new download for each worksheet? The number of tables my get
quite large and it's not exactly quick now.

I appreciate any help you can offer.

Thanks,
John


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Use MS Query to query data within the current work book Steve Kesler Excel Discussion (Misc queries) 0 August 6th 09 05:22 PM
Importing Data via Web Query - Can values be passed to query? [email protected] Excel Discussion (Misc queries) 5 May 9th 06 06:21 PM
Save data retreived from query without saving query Anthony Excel Discussion (Misc queries) 0 January 25th 06 07:17 PM
How to Process Query Data after Query is Refreshed rajpuneyani Excel Programming 2 July 30th 04 02:13 PM
Query returning more data than will fit on worksheet with VBA DB query... ChrisSmith Excel Programming 0 June 8th 04 12:07 PM


All times are GMT +1. The time now is 01:42 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"