Jump to content
Macro Express Forums

How to get a table in website using native functions?


Recommended Posts

You can copy the text to your clipboard and process it. Normally a table will come in with tabs between cells that you can parse. Though my prefered way it so use the GET command and process the data out of the HTML. 

Link to comment
Share on other sites

You might get more specific help if you tell us the site link and show us the table, plus the macro you have attempted so far.

 

Meanwhile, following Cory’s suggestion, if you have now managed to select the entire table (of text?) and copy it to the clipboard, I’d suggest next using Variable Set String > Set Value from Clipboard

Link to comment
Share on other sites

Another thing: HTML is more complicated, but sometimes there are labels for elements that make it super simple to find what you want. 

Also if the web page is secure, you might not be able to do it with the GET method.

Link to comment
Share on other sites

Oh! also you can link actively to a web page in Excel. If you're planning on going to Excel with this data, this is the better option. Go to the Data section of the ribbon bar, then "from web" and follow the wizard. 

Link to comment
Share on other sites

2 hours ago, terrypin said:

You might get more specific help if you tell us the site link and show us the table, plus the macro you have attempted so far.

 

Meanwhile, following Cory’s suggestion, if you have now managed to select the entire table (of text?) and copy it to the clipboard, I’d suggest next using Variable Set String > Set Value from Clipboard

Hi terrypin, I can't show the table because it is inside Facebook ads, but it is not selectable.

Link to comment
Share on other sites

If the "HTTP Get" command doesn't work, you should be able to access some or all of a page's code via your browser. In most browsers, Ctrl + U shows the code for the page.

 

So your script might look like this:

 

Text Type (Simulate Keystrokes): <CONTROL>u
Text Type (Simulate Keystrokes): <CONTROL>a // Select all
Text Type (Simulate Keystrokes): <CONTROL>c // Copy to clipboard
 
Variable Set String %PageCode% from the clipboard contents
 
If Variable %PageCode% Contains "<table>"
// (Rules for extracting table information)
End If

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...