Read plain text on a non-HTML web page, VBA/Excel

92 Views Asked by At

I'm pretty new to VBA, but I haven't found a possible solution to the problem in other programming languages.

Let’s say we have a non-HTML web page (e.g. JS, SQL etc.) so that standard HTTP GET operation returns us HTML tags without the desired content. Conversely, if we do copy-paste (Ctrl + c, Ctrl + v), we can directly copy the text that appears on the page, no matter what language it is displayed.

Is it possible in VBA (or any other programming language) to copy only the text that appears on a web page? (Not parsing, but actually doing CTRL + C and then CTRL + V)

Edit:I think it would be good to add an example to my intention.

Check out this link: cssscript.com/demo/calendar-generator-base It contains a calendar JS-based. Now, if we try to perform HTTP GET on the above page, we will not see "June" or the day numbers per month (You can see here HTTP GET request)

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>Simple Calendar Generator Example</title>
    <link href="https://www.cssscript.com/wp-includes/css/sticky.css" rel="stylesheet" type="text/css">
    <link href="https://www.cssscript.com/wp-includes/css/sticky.css" rel="stylesheet" type="text/css">
    <link rel="stylesheet" href="./style.css" />
</head>
...

However, if you get in the webpage and do CTRL + C and then CTRL + V you can copy the values ​​I mentioned (You can see the result here, or just try to copy to yours notepad)

    Download
    Back To CSS Script

Simple Calendar Generator Example
June

    Mo
    Tu
    We
    Th
    Fr
    Sa
    Su
    1
    2
    3
    4
    5
    6
    7
    8
...

Thanks

0

There are 0 best solutions below