Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Get Info From Web
Has anyone had any success copying data from the web?
I can't use the open web page option, I actually need to "Screen Scrape" the data. I can get to the page, input the account numbers from my excel sheet to Internet Explorer, but I haven't found any info on how to get the data from the web back into Excel. I'd love any help you can provide! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Get Info From Web
You will need to become familiar with the HTML Document Object Model (DOM) if you
want to access the contents of an HTML page. Do you have a URL ? Tim "MBSNewbie" wrote in message ... Has anyone had any success copying data from the web? I can't use the open web page option, I actually need to "Screen Scrape" the data. I can get to the page, input the account numbers from my excel sheet to Internet Explorer, but I haven't found any info on how to get the data from the web back into Excel. I'd love any help you can provide! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Get Info From Web
Basically, it is taking credit card numbers from A2-A33 and grabbing the
charges from the website and populating it back to a worksheet. Should be pretty simple, the tables are not numbered, so I think I will have to play with that, if someone could get me started on how to bring the info from the table to Excel. Also, if there is too much info on the page, I need to hit Next Page... --------------------------------------------------------------------------------------------------------------------------- Here's what I have so far, I can get to the page and query the card, but I need to manually copy the contents of the table then answer the box as to whether the record is done or I need to copy & paste again... ----------------------------------------------------------------------------------------------------------------------------- Const url As String = "https://www65.americanexpress.com/opm/en_US/ViewStatement" Dim ie As Object, sampleData(1 To 2) As String, cTables As Object, X As Integer Dim MyArr As Variant, cl As Range, y As Worksheet, Account As String '///Setting For Each cl In Range([a2], [a33].End(3)) Account = cl.Value MsgBox "...Now Send your data into IE" Set ie = CreateObject("internetexplorer.application") With ie Dim ws As Worksheet Dim newSheetName As String .Visible = True .navigate url Do While .ReadyState < 4: Loop '///Send data to IE With .Document.all .acct.Value = Account .submit1.Click Do While ie.ReadyState < 4: Loop End With End With Sheets.Add Type:="Worksheet" With ActiveSheet .Move After:=Worksheets(Worksheets.Count) .Name = cl.Value End With **Looking to replace this section with an automated copy & paste to Excel ** ================================================== ====== X = 1 For X = 1 To 10 Answer = MsgBox("Would You Like To Paste?", vbYesNo) If Answer = vbYes Then ActiveSheet.Paste ActiveCell.SpecialCells(xlLastCell).Select Else: Cells.Select With Selection .WrapText = False .Orientation = 0 .AddIndent = False .ShrinkToFit = False .ReadingOrder = xlContext .MergeCells = False End With Cells.EntireColumn.AutoFit Cells.EntireRow.AutoFit Range("A1").Select Exit For End If Next X ================================================== ================== Next End Sub ---------------------------------------------------------------------------------------------------------------------------------- "Tim Williams" <timjwilliams at gmail dot com wrote in message ... You will need to become familiar with the HTML Document Object Model (DOM) if you want to access the contents of an HTML page. Do you have a URL ? Tim "MBSNewbie" wrote in message ... Has anyone had any success copying data from the web? I can't use the open web page option, I actually need to "Screen Scrape" the data. I can get to the page, input the account numbers from my excel sheet to Internet Explorer, but I haven't found any info on how to get the data from the web back into Excel. I'd love any help you can provide! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Move cell info and info in range of cells on new entry | Excel Discussion (Misc queries) | |||
Copied info from Excel worksheet, but pasted info won't work in fo | Excel Discussion (Misc queries) | |||
Copy info into empty cells below info, until finds cell with new d | Excel Discussion (Misc queries) | |||
Tables, How do I make new info push existing info to the next row? | Excel Worksheet Functions | |||
Link info in one cell to info in several cells in another column (like a database) | Excel Discussion (Misc queries) |