Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2007 / MS Query - editing existing query to another sheet | Excel Discussion (Misc queries) | |||
Automate IE Web Query | Excel Programming | |||
Anyone Else Use Database Query to Query Another Sheet in the Same Excel Workbook? | Excel Discussion (Misc queries) | |||
automate query parameter refresh and multiple chart print out | Excel Programming | |||
Automate Excel from VS.NET | Excel Programming |