[Table of Contents] [docx version]
SpreadsheetML Reference Material - Table of Contents
This element specifies the properties for a web query source. A web query will retrieve data from HTML tables, and can also supply HTTP "Get" parameters to be processed by the web server in generating the HTML by including the parameters and parameter elements.
Here's an example of a web query connection:
[Example:
<connection id="1" name="Connection" type="4" refreshedVersion="0"
background="1" saveData="1">
<webPr sourceData="1" parsePre="1" consecutive="1"
url="http://ServerName/Image%20Library/Forms/AllItems.aspx" htmlTables="1">
<tables count="1">
<s v="contentthumbnail"/>
</tables>
</webPr>
</connection>
end example]
Parent Elements |
connection (§3.13.1) |
Child Elements |
Subclause |
tables (Tables) |
§3.13.9 |
Attributes |
Description |
consecutive (Consecutive Delimiters) |
Flag indicating whether consecutive delimiters should be treated as just one delimiter.
The possible values for this attribute are defined by the XML Schema boolean datatype. |
editPage (Edit Query URL) |
The URL of the user-facing web page showing the web query data. This URL is persisted in the case that sourceData="true" and url has been redirected to reference an XML file. Then the user-facing page can be shown in the UI, and the XML data can be retrieved behind the scenes.
The possible values for this attribute are defined by the ST_Xstring simple type (§3.18.96). |
firstRow (Use First Row) |
Flag indicating whether to parse all tables inside a PRE block with the same width settings as the first row.
The possible values for this attribute are defined by the XML Schema boolean datatype. |
htmlFormat (HTML Formatting Handling) |
How to handle formatting from the HTML source when bringing web query data into the worksheet. Relevant when sourceData is True.
Values are as follows: 1. None - no formatting at all 2. RTF - honor just rich text formatting 3. All - honor all html formatting.
The possible values for this attribute are defined by the ST_HtmlFmt simple type (§3.18.43). |
htmlTables (HTML Tables Only) |
Flag indicating whether web queries should only work on HTML tables.
The possible values for this attribute are defined by the XML Schema boolean datatype. |
parsePre (Parse PRE) |
Flag indicating whether data contained within HTML <PRE> tags in the web page is parsed into columns when you import the page into a query table.
The possible values for this attribute are defined by the XML Schema boolean datatype. |
post (Web Post) |
Returns or sets the string used with the post method of inputting data into a web server to return data from a web query.
The possible values for this attribute are defined by the ST_Xstring simple type (§3.18.96). |
sourceData (Import XML Source Data) |
Flag indicating that XML source data should be imported instead of the HTML table itself.
Used when a web query exists to an HTML table with the following attribute.
<TABLE ... o:WebQuerySourceHRef=”http://...” ... > ... </TABLE>
The possible values for this attribute are defined by the XML Schema boolean datatype. |
textDates (Dates as Text) |
Flag indicating whether dates should be imported into cells in the worksheet as text rather than dates.
The possible values for this attribute are defined by the XML Schema boolean datatype. |
url (URL) |
URL to use to refresh external data.
The possible values for this attribute are defined by the ST_Xstring simple type (§3.18.96). |
xl2000 (Refreshed in Excel 2000) |
This flag exists for backward compatibility with older existing spreadsheet files, and is set to true if this web query was refreshed in a spreadsheet application newer than or equal to Microsoft Excel 2000. This is an optional attribute that can be ignored.
The possible values for this attribute are defined by the XML Schema boolean datatype. |
xl97 (Created in Excel 97) |
This flag exists for backward compatibility with older existing spreadhseet files, and is set to true if this web query was created in Microsoft Excel 97. This is an optional attribute that can be ignored.
The possible values for this attribute are defined by the XML Schema boolean datatype. |
xml (XML Source) |
true if the web query source is XML (versus HTML), otherwise false.
The possible values for this attribute are defined by the XML Schema boolean datatype. |
The following XML Schema fragment defines the contents of this element:
<complexType name="CT_WebPr">
<sequence>
<element name="tables" minOccurs="0" maxOccurs="1" type="CT_Tables"/>
</sequence>
<attribute name="xml" use="optional" type="xsd:boolean" default="false"/>
<attribute name="sourceData" use="optional" type="xsd:boolean" default="false"/>
<attribute name="parsePre" use="optional" type="xsd:boolean" default="false"/>
<attribute name="consecutive" use="optional" type="xsd:boolean" default="false"/>
<attribute name="firstRow" use="optional" type="xsd:boolean" default="false"/>
<attribute name="xl97" use="optional" type="xsd:boolean" default="false"/>
<attribute name="textDates" use="optional" type="xsd:boolean" default="false"/>
<attribute name="xl2000" use="optional" type="xsd:boolean" default="false"/>
<attribute name="url" use="optional" type="ST_Xstring"/>
<attribute name="post" use="optional" type="ST_Xstring"/>
<attribute name="htmlTables" use="optional" type="xsd:boolean" default="false"/>
<attribute name="htmlFormat" use="optional" type="ST_HtmlFmt" default="none"/>
<attribute name="editPage" use="optional" type="ST_Xstring"/>
</complexType>