Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Automate Excel URL Web Query

Synopsis:
I made this winforms application that automates a webpage from data the user
inputs. The webpage collects data and puts it into a database (it's a tab
delimited format). All I have to do is make a URL web query so that the
information is automatically inserted into the Excel file when the user opens
the excel file and click refresh.

What I want:
For the user to open the Excel File and press "Refresh" to get the
information from the webpage.

Question:
How do I set an Excel Object's URL Web Query?

What I know how to do:
Create an Excel Object, Workbook, and Worksheet.

Language of Choice:
C#

Thank you in advance. If I am not clear in what I want to do, please tell me
so I can elaborate.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default Automate Excel URL Web Query

Zedox,

I don't speak C# but I am learning Excel and VBA.

I hope something in this code answers your question:

MSExcel 2007

Sub WebQuery()
'
' WebQuery Macro
'

'
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://www.google.com/ig?hl=en", Destination:=Range("$F$1"))
.Name = "ig?hl=en"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlEntirePage
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
End Sub
--
Thank you,

scrowley(AT)littleonline.com


"Zedox" wrote:

Synopsis:
I made this winforms application that automates a webpage from data the user
inputs. The webpage collects data and puts it into a database (it's a tab
delimited format). All I have to do is make a URL web query so that the
information is automatically inserted into the Excel file when the user opens
the excel file and click refresh.

What I want:
For the user to open the Excel File and press "Refresh" to get the
information from the webpage.

Question:
How do I set an Excel Object's URL Web Query?

What I know how to do:
Create an Excel Object, Workbook, and Worksheet.

Language of Choice:
C#

Thank you in advance. If I am not clear in what I want to do, please tell me
so I can elaborate.

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
Excel 2007 / MS Query - editing existing query to another sheet Hotpepperz Excel Discussion (Misc queries) 0 June 13th 08 06:53 PM
Automate IE Web Query Andy Excel Programming 0 March 4th 08 07:31 PM
Anyone Else Use Database Query to Query Another Sheet in the Same Excel Workbook? jocke Excel Discussion (Misc queries) 1 November 29th 05 01:44 PM
automate query parameter refresh and multiple chart print out misscrf[_2_] Excel Programming 0 September 10th 04 10:18 PM
Automate Excel from VS.NET Aaron[_12_] Excel Programming 3 February 17th 04 04:13 AM


All times are GMT +1. The time now is 05:43 PM.

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"