ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   getting data from web (https://www.excelbanter.com/excel-programming/444202-getting-data-web.html)

mp

getting data from web
 
this snippet gets data from web url and puts into a range
is there a way to intercept just the returned csv string directly?
I can use this, put into a temp range, then read
from the temp range to do what i need to,
but if I could just get it to return the string
I could also just parse that.( I see that the following works, but
really can't understand how by looking at the code)


....when this is run i'm on a 'Temp' worksheet just as a holder for the csv
string
With ActiveSheet.QueryTables.Add(Connection:="URL;" & qurl,
Destination:=DataSheet.Range("a1"))
.BackgroundQuery = True
.TablesOnlyFromHTML = False
.Refresh BackgroundQuery:=False
.saveData = True
End With

Range("a1").CurrentRegion.TextToColumns
Destination:=Range("a1"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False,
Tab:=True, _
Semicolon:=False, Comma:=True, Space:=False, other:=False

thanks
mark




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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com