WebQueryProperties Class

Web Query Properties.When the object is serialized out as xml, its qualified name is x:webPr.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlCompositeElement
      DocumentFormat.OpenXml.Spreadsheet.WebQueryProperties

Namespace:  DocumentFormat.OpenXml.Spreadsheet
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Declaration
<ChildElementInfoAttribute(GetType(Tables))> _
Public Class WebQueryProperties _
    Inherits OpenXmlCompositeElement
'Usage
Dim instance As WebQueryProperties
[ChildElementInfoAttribute(typeof(Tables))]
public class WebQueryProperties : OpenXmlCompositeElement

Remarks

The following table lists the possible child types:

  • Tables <x:tables>

[ISO/IEC 29500-1 1st Edition]

18.13.13 webPr (Web Query Properties)

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="https://ServerName/Image%20Library/Forms/AllItems.aspx" htmlTables="1">
<tables count="1">
<s v="contentthumbnail"/>
</tables>
</webPr>
</connection>

end example]

Parent Elements

connection (§18.13.1)

Child Elements

Subclause

tables (Tables)

§18.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 W3C 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 (§22.9.2.19).

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 W3C 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 (§18.18.41).

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 W3C 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 W3C 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 (§22.9.2.19).

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 W3C 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 W3C 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 (§22.9.2.19).

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 W3C 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 W3C 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 W3C XML Schema boolean datatype.

[Note: The W3C XML Schema definition of this element’s content model (CT_WebPr) is located in §A.2. end note]

© ISO/IEC29500: 2008.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

WebQueryProperties Members

DocumentFormat.OpenXml.Spreadsheet Namespace