QueryTable.WebFormatting procedure builder

QueryTable.WebFormatting (Excel)

Returns or sets a value that determines how much formatting from a webpage, if any, is applied when you import the page into a query table.

xlWebFormattingAll - All formatting is imported, xlWebFormattingNone - No formatting is imported, xlWebFormattingRTF - Rich Text Format - compatible formatting is imported.

Use this property only when the query table's QueryType property is set to xlWebQuery, and the query returns an HTML document. If you import data by using the user interface, data from a web query or a text query is imported as a QueryTable object, while all other external data is imported as a ListObject object. If you import data by using the object model, data from a web query or a text query must be imported as a QueryTable, while all other external data can be imported as either a ListObject or a QueryTable. The WebFormatting property applies only to QueryTable objects.

ActiveCell.QueryTable.WebFormatting = xlWebFormattingAll