Hello,
I am trying to get one table in Excel from a webpage. The Webpage is this: http://bvb.ro/FinancialInstruments/Details/FinancialInstrumentsDetails.aspx?s=bio
I want to get also the table from "Financial" section of that webpage, not only from the default "Overview".
I created code that imports data for the symbol i input, but it gets only data from "Overview" I don't want that, i need also the table from "Financials": Annual financial information (from the website menu). I attached a photo to see exactly what table i refer to.
This is the code and the excel file is attached:
Do you have any solution to import the table i need ?
And after that, do you have any idea of how i can get into an excel sheet that data for all companies on the website ? (some script to loop through all symbols and arrange the data into a tabel structure with columns: company, year, indicator 1, indicator 2 etc)
Thanks a lot !
I am trying to get one table in Excel from a webpage. The Webpage is this: http://bvb.ro/FinancialInstruments/Details/FinancialInstrumentsDetails.aspx?s=bio
I want to get also the table from "Financial" section of that webpage, not only from the default "Overview".
I created code that imports data for the symbol i input, but it gets only data from "Overview" I don't want that, i need also the table from "Financials": Annual financial information (from the website menu). I attached a photo to see exactly what table i refer to.
This is the code and the excel file is attached:
Code:
Sub Import_Data()
ActiveSheet.Columns("A:D").Delete
'x is the simbol of the share. Ex: snp, bio
x = Application.InputBox("Please insert the share symbol:")
With ActiveSheet.QueryTables.Add(Connection:="URL;http://bvb.ro/FinancialInstruments/Details/FinancialInstrumentsDetails.aspx?s=" & x, Destination:=Range("$A$1"))
'.CommandType = 0
.Name = "FinancialInstrumentsDetails.aspx?s=bio"
.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
Do you have any solution to import the table i need ?
And after that, do you have any idea of how i can get into an excel sheet that data for all companies on the website ? (some script to loop through all symbols and arrange the data into a tabel structure with columns: company, year, indicator 1, indicator 2 etc)
Thanks a lot !
Attachments
Last edited: