April 2006
Beginner
1114 pages
98h 16m
English
querytable.WebPreFormattedTextToColumns [= setting]
For web queries, True parses rows in <PRE> (preformatted) sections of a web page and places aligned items in separate cells. False parses each row in <PRE> sections as a single data item and places the entire row in one cell.
For example, the following code imports a sample web page and parses rows in <PRE> sections as multiple cells:
Set qt = ActiveSheet.QueryTables(1)
qt.Connection = "URL;file://" & ThisWorkbook.Path & "\preblocks.html"
qt.WebSelectionType = xlAllTables
qt.WebPreFormattedTextToColumns = True
qt.RefreshThe web page containing items parsed into cells looks like this:
<html>
<body>
<pre>
1 2 3 4
5 6 7 8
</pre>
</body>
</html>Read now
Unlock full access