shahin
Active Member
How can i get all the data derived from a table out of a webpage? I've tried myself to accomplish the task and I'm very close to the solution. Any help to reach me there will be highly appreciated.
The macro I've tried with:
The output I'm getting:
The output I wish to get:
For more clarity: I wish to kick out this ":" sign in every alternate position as in, [2,4,6,8, so on] and put "," in place. Thanks.
The macro I've tried with:
Code:
Sub Get_Table()
Dim HTML As HTMLDocument, post As Object
Dim elem As Object, overview$, URL$
URL = "https://www.strollay.com/orange-silk-saree-137116"
With CreateObject("InternetExplorer.Application")
.Visible = False
.navigate URL
While .Busy = True Or .readyState < 4: DoEvents: Wend
Set HTML = .document
For Each post In HTML.getElementsByClassName("data-table")(0).Rows
For Each elem In post.Cells
overview = overview & IIf(overview = "", "", " : ") & elem.innerText
Next elem
Next post
[A1] = overview
End With
End Sub
The output I'm getting:
Code:
Item Code : GST18944-902 : Fabric : Silk : Blouse Fabric : Silk : Blouse Type : Un-Stitched : Saree Length : 6.00 Mtrs : Blouse Length : 0.80 Mtrs : Work : Embroidered : Delivery Time : It takes 3-6 Working Days once Shipped.
The output I wish to get:
Code:
Item Code : GST18944-902 , Fabric : Silk , Blouse Fabric : Silk , Blouse Type : Un-Stitched , Saree Length : 6.00 Mtrs , Blouse Length : 0.80 Mtrs , Work : Embroidered , Delivery Time : It takes 3-6 Working Days once Shipped.
For more clarity: I wish to kick out this ":" sign in every alternate position as in, [2,4,6,8, so on] and put "," in place. Thanks.
Last edited: