4.1 Filtering and sorting a list and returning XML
This example shows how this protocol is used to open a view session. It demonstrates how this protocol is used to filter a list in a workbook and to fetch the representation of the workbook in XML format as specified in [MS-EXSPXML]. It also demonstrates how this protocol is used to sort the list.
This example assumes that a workbook has already been created and is stored in a location that the protocol server can load files from. The workbook contains a list with an AutoFilter. The following UML diagram illustrates this example.
Figure 3: Communication sequence diagram for filtering and sorting a list and returning XML
The order of operations, including the relevant XML for each step, is as follows:
Opening a new session (loading the workbook)
Request
-
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <OpenWorkbook xmlns="http://schemas.microsoft.com/office/Excel/Server/WebServices/ExcelServerInternalService/"> <url>http://Contoso/Docs/Documents/Filter.xlsx</url> <flags>Recyclable</flags> <parameter> <StateId>-1</StateId> <VisibleSheetRangeRequest> <FirstRow>-1</FirstRow> <VisibleRowsRequested>1</VisibleRowsRequested> <FirstColumn>-1</FirstColumn> <VisibleColumnsRequested>1</VisibleColumnsRequested> <VisibleFirstRowOffset>0</VisibleFirstRowOffset> <VisibleFirstColumnOffset>0</VisibleFirstColumnOffset> <NoAutoAdjustToPublishedUsedRange>false</NoAutoAdjustToPublishedUsedRange> <NeedAllBorderValues>false</NeedAllBorderValues> <ChartsOnly>false</ChartsOnly> </VisibleSheetRangeRequest> <Confirmation>Blank</Confirmation> <ConfirmationChoice>false</ConfirmationChoice> <ProtocolClientId>ms-ewa</ProtocolClientId> <RequestSiteId>bebf895a-f22a-49d5-b8b0-f65d01d0a399</RequestSiteId> <CompleteResponseTimeout>2000</CompleteResponseTimeout> <Flags></Flags> </parameter> <cultureParameter> <UICultureName>en-US</UICultureName> <DataCultureName>en-US</DataCultureName> <SharePointDataCultureName></SharePointDataCultureName> <TimeZoneSerialization>+0480#0000-11-00-01T02:00:00:0000#+0000#0000-03-00-02T02:00:00:0000#-0060</TimeZoneSerialization> </cultureParameter> <subscriberId>bebf895a-f22a-49d5-b8b0-f65d01d0a399</subscriberId> </OpenWorkbook> </s:Body> </s:Envelope>
Response
-
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <OpenWorkbookResponse xmlns="http://schemas.microsoft.com/office/Excel/Server/WebServices/ExcelServerInternalService/"> <OpenWorkbookResult> <StateId>1</StateId> <SpreadsheetData> <Workbook> <WorkbookOptions/> <Styles> <Style ID="sD"> <Font Size="11" FontName="Calibri" Color="#000000"/> </Style> <Style ID="1"> <Font Size="11" FontName="Calibri" Color="#000000"/><Interior Color="#D9D9D9" Pattern="Solid"/> </Style> <Style ID="2"> <Font Size="11" FontName="Calibri" Color="#000000"/> <Alignment Horizontal="Left"/> <Interior Color="#D9D9D9" Pattern="Solid"/> </Style> <Style ID="-1"> <Borders/> </Style> <Style ID="bD"> <Borders> <Border Weight="1" Position="Right" LineStyle="Continuous" Color="#D0D7E5"/> <Border Weight="1" Position="Bottom" LineStyle="Continuous" Color="#D0D7E5"/> </Borders> </Style> <Style ID="-3"> <Borders> <Border Weight="1" Position="Right" LineStyle="Continuous" Color="#D9D9D9"/> <Border Weight="1" Position="Bottom" LineStyle="Continuous" Color="#D9D9D9"/> </Borders> </Style> </Styles> <Worksheet ActiveSheet="1" Name="Sheet1"> <WorksheetOptions DisplayOutlines="1"/> <autofilters> <autofilter Row="0" ColFirst="0" Type="Sheet"> <item Index="0" DataType="Text" Name="Customer Geography"/> </autofilter> </autofilters> <Table LastNonEmptyRow="54" LastNonEmptyColumn="2" CurrentFirstRow="1" FirstVisibleRow="1" LastVisibleRow="1048576" CurrentFirstColumn="1" FirstVisibleColumn="1" LastVisibleColumn="16384" SelectionTop="2" SelectionLeft="4" DefaultRowHeight="15" DefaultRowHeightPixels="20" DefaultColumnWidth="48" DefaultColumnWidthPixels="64" DefaultIndentWidth="6.75" DefaultIndentWidthPixels="9"><Column Width="116.25" WidthPixels="155"/> <Row Height="15" HeightPixels="20"><Cell StyleID="2" BorderID="-3"> <Data>Customer Geography</Data> </Cell> </Row> </Table> </Worksheet> <Worksheet Name="Sheet2"> <WorksheetOptions DisplayOutlines="1"/> </Worksheet> <Worksheet Name="Sheet3"> <WorksheetOptions DisplayOutlines="1"/> </Worksheet> </Workbook> </SpreadsheetData> <HealthInformation> <StateFlags></StateFlags> <HealthScore>0</HealthScore> </HealthInformation> <SecondsBeforeNextPoll>60</SecondsBeforeNextPoll> <EditSessionIsDirty>false</EditSessionIsDirty> <EditSessionHasMultipleUsers>false</EditSessionHasMultipleUsers> </OpenWorkbookResult> <workbookId>1.V21.2l4QQ/7ySliVKuAUptXrY90.5.en-US5.en-US73.+0480#0000-11-00-01T02:00:00:0000#+0000#0000-03-00-02T02:00:00:0000#-006036.bebf895a-f22a-49d5-b8b0-f65d01d0a3991.N</workbookId> <outFlags>HasOpenItemPermission</outFlags> <clientWorkbookUri>http://Contoso/Docs/Documents/Filter.xlsx</clientWorkbookUri> </OpenWorkbookResponse> </s:Body> </s:Envelope>
Fetching the XML
Request
-
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <GetRange xmlns="http://schemas.microsoft.com/office/Excel/Server/WebServices/ExcelServerInternalService/"> <parameter> <WorkbookId>1.V21.2l4QQ/7ySliVKuAUptXrY90.5.en-US5.en-US73.+0480#0000-11-00-01T02:00:00:0000#+0000#0000-03-00-02T02:00:00:0000#-006036.bebf895a-f22a-49d5-b8b0-f65d01d0a3991.N</WorkbookId> <StateId>1</StateId> <VisibleSheetRangeRequest> <SheetName>Sheet1</SheetName> <FirstRow>0</FirstRow> <VisibleRowsRequested>28</VisibleRowsRequested> <FirstColumn>0</FirstColumn> <VisibleColumnsRequested>30</VisibleColumnsRequested> <VisibleFirstRowOffset>0</VisibleFirstRowOffset> <VisibleFirstColumnOffset>0</VisibleFirstColumnOffset> <NoAutoAdjustToPublishedUsedRange>true</NoAutoAdjustToPublishedUsedRange> <NeedAllBorderValues>false</NeedAllBorderValues> <ChartsOnly>false</ChartsOnly> </VisibleSheetRangeRequest> <Confirmation>Blank</Confirmation> <ConfirmationChoice>false</ConfirmationChoice> <ProtocolClientId>ms-ewa</ProtocolClientId> <RequestSiteId>bebf895a-f22a-49d5-b8b0-f65d01d0a399</RequestSiteId> <CompleteResponseTimeout>0</CompleteResponseTimeout> <Flags></Flags> </parameter> </GetRange> </s:Body> </s:Envelope>
Response
-
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <GetRangeResponse xmlns="http://schemas.microsoft.com/office/Excel/Server/WebServices/ExcelServerInternalService/"> <GetRangeResult> <StateId>1</StateId> <SpreadsheetData><Workbook><WorkbookOptions/> <Styles> <Style ID="sD"> <Font Size="11" FontName="Calibri" Color="#000000"/> </Style> <Style ID="1"> <Font Size="11" FontName="Calibri" Color="#000000"/> <Interior Color="#D9D9D9" Pattern="Solid"/> </Style> <Style ID="2"> <Font Size="11" FontName="Calibri" Color="#000000"/> <Alignment Horizontal="Left"/> <Interior Color="#D9D9D9" Pattern="Solid"/> </Style> <Style ID="3"> <Font Size="11" FontName="Calibri" Color="#000000"/> <Interior Color="#D9D9D9" Pattern="Solid"/> </Style> <Style ID="4"> <Font Size="11" FontName="Calibri" Color="#000000"/> <Alignment Horizontal="Left"/> <Interior Color="#D9D9D9" Pattern="Solid"/> </Style> <Style ID="5"> <Font Size="11" FontName="Calibri" Color="#000000"/> <Alignment Horizontal="Left"/> </Style> <Style ID="6"> <Font Size="11" FontName="Calibri" Color="#000000"/> </Style> <Style ID="7"> <Font Size="11" FontName="Calibri" Color="#000000"/> <Alignment Horizontal="Left"/> </Style> <Style ID="-1"> <Borders/> </Style> <Style ID="bD"> <Borders> <Border Weight="1" Position="Right" LineStyle="Continuous" Color="#D0D7E5"/> <Border Weight="1" Position="Bottom" LineStyle="Continuous" Color="#D0D7E5"/> </Borders> </Style> <Style ID="-3"> <Borders> <Border Weight="1" Position="Right" LineStyle="Continuous" Color="#D9D9D9"/> </Borders> </Style> <Style ID="-4"> <Borders> <Border Weight="1" Position="Right" LineStyle="Continuous" Color="#D0D7E5"/> </Borders> </Style> <Style ID="-5"> <Borders> <Border Weight="1" Position="Bottom" LineStyle="Continuous" Color="#D9D9D9"/> </Borders> </Style> <Style ID="-6"> <Borders> <Border Weight="1" Position="Right" LineStyle="Continuous" Color="#D9D9D9"/> <Border Weight="1" Position="Bottom" LineStyle="Continuous" Color="#D9D9D9"/> </Borders> </Style> <Style ID="-7"> <Borders> <Border Weight="1" Position="Bottom" LineStyle="Continuous" Color="#D0D7E5"/> </Borders> </Style> </Styles> <Worksheet ActiveSheet="1" Name="Sheet1"><WorksheetOptions DisplayOutlines="1"/> <autofilters> <autofilter Row="0" ColFirst="0" Type="Sheet"><item Index="0" DataType="Text" Name="Customer Geography"/> <item Index="1" Name=" Internet Sales Amount "/> </autofilter> </autofilters> <Table LastNonEmptyRow="54" LastNonEmptyColumn="30" CurrentFirstRow="1" FirstVisibleRow="1" LastVisibleRow="1048576" CurrentFirstColumn="1" FirstVisibleColumn="1" LastVisibleColumn="16384" SelectionTop="2" SelectionLeft="4" DefaultRowHeight="15" DefaultRowHeightPixels="20" DefaultColumnWidth="48" DefaultColumnWidthPixels="64" DefaultIndentWidth="6.75" DefaultIndentWidthPixels="9"> <Column Width="116.25" WidthPixels="155"/> <Column Width="131.25" WidthPixels="175"/> <Column Width="48" WidthPixels="64" Span="27"/> <Row Height="15" HeightPixels="20"> <Cell StyleID="2" BorderID="-5"> <Data>Customer Geography</Data> </Cell> <Cell StyleID="4" BorderID="-6"> <Data xml:space="preserve">Internet Sales Amount</Data> </Cell> </Row> <Row Height="15" HeightPixels="20"> <Cell StyleID="5"> <Data>New South Wales</Data> </Cell> <Cell StyleID="7" FormulaBarText="3934485.7265"> <Data xml:space="preserve"> $ 3,934,485.73 </Data> </Cell> </Row> <Row Height="15" HeightPixels="20"> <Cell StyleID="5"> <Data>Queensland</Data> </Cell> <Cell StyleID="7" FormulaBarText="1988415.0297"> <Data xml:space="preserve"> $ 1,988,415.03 </Data> </Cell> </Row> <Row Height="15" HeightPixels="20"> <Cell StyleID="5"> <Data>South Australia</Data> </Cell> <Cell StyleID="7" FormulaBarText="618255.8616"> <Data xml:space="preserve"> $ 618,255.86 </Data> </Cell> </Row> <Row Height="15" HeightPixels="20"> <Cell StyleID="5"> <Data>Tasmania</Data> </Cell> <Cell StyleID="7" FormulaBarText="239937.9033"> <Data xml:space="preserve"> $ 239,937.90 </Data> </Cell> </Row> <Row Height="15" HeightPixels="20"> <Cell StyleID="5"> <Data>Victoria</Data> </Cell> <Cell StyleID="7" FormulaBarText="2279906.0633"> <Data xml:space="preserve"> $ 2,279,906.06 </Data> </Cell> </Row> <Row Height="15" HeightPixels="20"> <Cell StyleID="5"> <Data>Alberta</Data> </Cell> <Cell StyleID="7" FormulaBarText="22467.8025"> <Data xml:space="preserve"> $ 22,467.80 </Data> </Cell> </Row> <Row Height="15" HeightPixels="20"> <Cell StyleID="5"> <Data>British Columbia</Data> </Cell> <Cell StyleID="7" FormulaBarText="1955340.0996"> <Data xml:space="preserve"> $ 1,955,340.10 </Data> </Cell> </Row> <Row Height="15" HeightPixels="20"> <Cell StyleID="5"> <Data>Ontario</Data> </Cell> <Cell StyleID="7" FormulaBarText="36.96"> <Data xml:space="preserve"> $ 36.96 </Data> </Cell> </Row> <Row Height="15" HeightPixels="20"> <Cell StyleID="5"> <Data>Charente-Maritime</Data> </Cell> <Cell StyleID="7" FormulaBarText="34441.7349"> <Data xml:space="preserve"> $ 34,441.73 </Data> </Cell> </Row> <Row Height="15" HeightPixels="20"> <Cell StyleID="5"> <Data>Essonne</Data> </Cell> <Cell StyleID="7" FormulaBarText="279297.1838"> <Data xml:space="preserve"> $ 279,297.18 </Data> </Cell> </Row> <Row Height="15" HeightPixels="20"> <Cell StyleID="5"> <Data>Garonne (Haute)</Data> </Cell><Cell StyleID="7" FormulaBarText="54641.7232"> <Data xml:space="preserve"> $ 54,641.72 </Data> </Cell> </Row> <Row Height="15" HeightPixels="20"> <Cell StyleID="5"> <Data>Hauts de Seine</Data> </Cell><Cell StyleID="7" FormulaBarText="263416.1854"> <Data xml:space="preserve"> $ 263,416.19 </Data> </Cell> </Row> <Row Height="15" HeightPixels="20"> <Cell StyleID="5"> <Data>Loir et Cher</Data> </Cell> <Cell StyleID="7" FormulaBarText="21473.7396"> <Data xml:space="preserve"> $ 21,473.74 </Data> </Cell> </Row> <Row Height="15" HeightPixels="20"> <Cell StyleID="5"> <Data>Loiret</Data> </Cell> <Cell StyleID="7" FormulaBarText="91562.9056"> <Data xml:space="preserve"> $ 91,562.91 </Data> </Cell> </Row> <Row Height="15" HeightPixels="20"> <Cell StyleID="5"> <Data>Moselle</Data> </Cell> <Cell StyleID="7" FormulaBarText="94046.2295"> <Data xml:space="preserve"> $ 94,046.23 </Data> </Cell> </Row> <Row Height="15" HeightPixels="20"> <Cell StyleID="5"> <Data>Nord</Data> </Cell><Cell StyleID="7" FormulaBarText="391400.2014"> <Data xml:space="preserve"> $ 391,400.20 </Data> </Cell> </Row> <Row Height="15" HeightPixels="20"> <Cell StyleID="5"> <Data>Pas de Calais</Data> </Cell> <Cell StyleID="7" FormulaBarText="11342.9225"> <Data xml:space="preserve"> $ 11,342.92 </Data> </Cell> </Row> <Row Height="15" HeightPixels="20"> <Cell StyleID="5"> <Data>Seine (Paris)</Data> </Cell> <Cell StyleID="7" FormulaBarText="539725.8"> <Data xml:space="preserve"> $ 539,725.80 </Data> </Cell> </Row> <Row Height="15" HeightPixels="20"> <Cell StyleID="5"> <Data>Seine et Marne</Data> </Cell> <Cell StyleID="7" FormulaBarText="109735.2384"> <Data xml:space="preserve"> $ 109,735.24 </Data> </Cell> </Row> <Row Height="15" HeightPixels="20"> <Cell StyleID="5"> <Data>Seine Saint Denis</Data> </Cell> <Cell StyleID="7" FormulaBarText="379479.7479"> <Data xml:space="preserve"> $ 379,479.75 </Data> </Cell> </Row> <Row Height="15" HeightPixels="20"> <Cell StyleID="5"> <Data>Somme</Data> </Cell> <Cell StyleID="7" FormulaBarText="29555.2814"> <Data xml:space="preserve"> $ 29,555.28 </Data> </Cell> </Row> <Row Height="15" HeightPixels="20"> <Cell StyleID="5"> <Data>Val de Marne</Data> </Cell> <Cell StyleID="7" FormulaBarText="28478.1246"> <Data xml:space="preserve"> $ 28,478.12 </Data> </Cell> </Row> <Row Height="15" HeightPixels="20"> <Cell StyleID="5"> <Data>Val d'Oise</Data> </Cell> <Cell StyleID="7" FormulaBarText="46755.9003"> <Data xml:space="preserve"> $ 46,755.90 </Data> </Cell> </Row> <Row Height="15" HeightPixels="20"> <Cell StyleID="5"> <Data>Yveline</Data> </Cell> <Cell StyleID="7" FormulaBarText="268664.7958"> <Data xml:space="preserve"> $ 268,664.80 </Data> </Cell> </Row> <Row Height="15" HeightPixels="20"> <Cell StyleID="5"> <Data>Bayern</Data> </Cell> <Cell StyleID="7" FormulaBarText="399966.7822"> <Data xml:space="preserve"> $ 399,966.78 </Data> </Cell> </Row> <Row Height="15" HeightPixels="20"> <Cell StyleID="5"> <Data>Brandenburg</Data> </Cell> <Cell StyleID="7" FormulaBarText="119571.0799"> <Data xml:space="preserve"> $ 119,571.08 </Data> </Cell> </Row> <Row Height="15" HeightPixels="20"> <Cell StyleID="5"> <Data>Hamburg</Data> </Cell> <Cell StyleID="7" FormulaBarText="467219.0392"> <Data xml:space="preserve"> $ 467,219.04 </Data> </Cell> </Row> </Table> </Worksheet> <Worksheet Name="Sheet2"> <WorksheetOptions DisplayOutlines="1"/> </Worksheet> <Worksheet Name="Sheet3"> <WorksheetOptions DisplayOutlines="1"/> </Worksheet> </Workbook> </SpreadsheetData> <HealthInformation> <StateFlags></StateFlags> <HealthScore>0</HealthScore> </HealthInformation> <SecondsBeforeNextPoll>60</SecondsBeforeNextPoll> <EditSessionIsDirty>false</EditSessionIsDirty> <EditSessionHasMultipleUsers>false</EditSessionHasMultipleUsers> </GetRangeResult> </GetRangeResponse> </s:Body> </s:Envelope>
Applying the filter
Request
-
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <ApplyItemFilter xmlns="http://schemas.microsoft.com/office/Excel/Server/WebServices/ExcelServerInternalService/"> <parameter> <WorkbookId>1.V21.2l4QQ/7ySliVKuAUptXrY90.5.en-US5.en-US73.+0480#0000-11-00-01T02:00:00:0000#+0000#0000-03-00-02T02:00:00:0000#-006036.bebf895a-f22a-49d5-b8b0-f65d01d0a3991.N</WorkbookId> <StateId>-1</StateId> <Confirmation>Blank</Confirmation> <ConfirmationChoice>false</ConfirmationChoice> <ProtocolClientId>ms-ewa</ProtocolClientId> <RequestSiteId>bebf895a-f22a-49d5-b8b0-f65d01d0a399</RequestSiteId> <CompleteResponseTimeout>0</CompleteResponseTimeout> <Flags></Flags> </parameter> <autoFilterOptions> <AutoFilterType>Sheet</AutoFilterType> <CriteriaType>AboveAverage</CriteriaType> <Id>0</Id> <SheetName>Sheet1</SheetName> <Column>2</Column> <NamedObjectView>false</NamedObjectView> </autoFilterOptions> <blanks>false</blanks> <hideBlanks>false</hideBlanks> </ApplyItemFilter> </s:Body> </s:Envelope>
Response
-
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <ApplyItemFilterResponse xmlns="http://schemas.microsoft.com/office/Excel/Server/WebServices/ExcelServerInternalService/"> <ApplyItemFilterResult> <StateId>2</StateId> <HealthInformation> <StateFlags></StateFlags> <HealthScore>0</HealthScore> </HealthInformation> <SecondsBeforeNextPoll>60</SecondsBeforeNextPoll> <EditSessionIsDirty>false</EditSessionIsDirty> <EditSessionHasMultipleUsers>false</EditSessionHasMultipleUsers> </ApplyItemFilterResult> </ApplyItemFilterResponse> </s:Body> </s:Envelope>
Fetching the XML
Request
-
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <GetRange xmlns="http://schemas.microsoft.com/office/Excel/Server/WebServices/ExcelServerInternalService/"> <parameter> <WorkbookId>1.V21.2l4QQ/7ySliVKuAUptXrY90.5.en-US5.en-US73.+0480#0000-11-00-01T02:00:00:0000#+0000#0000-03-00-02T02:00:00:0000#-006036.bebf895a-f22a-49d5-b8b0-f65d01d0a3991.N</WorkbookId> <StateId>2</StateId> <VisibleSheetRangeRequest> <SheetName>Sheet1</SheetName> <FirstRow>0</FirstRow> <VisibleRowsRequested>28</VisibleRowsRequested> <FirstColumn>0</FirstColumn> <VisibleColumnsRequested>30</VisibleColumnsRequested> <VisibleFirstRowOffset>0</VisibleFirstRowOffset> <VisibleFirstColumnOffset>0</VisibleFirstColumnOffset> <NoAutoAdjustToPublishedUsedRange>true</NoAutoAdjustToPublishedUsedRange> <NeedAllBorderValues>false</NeedAllBorderValues> <ChartsOnly>false</ChartsOnly> </VisibleSheetRangeRequest> <Confirmation>Blank</Confirmation> <ConfirmationChoice>false</ConfirmationChoice> <ProtocolClientId>ms-ewa</ProtocolClientId> <RequestSiteId>bebf895a-f22a-49d5-b8b0-f65d01d0a399</RequestSiteId> <CompleteResponseTimeout>0</CompleteResponseTimeout> <Flags></Flags> </parameter> </GetRange> </s:Body> </s:Envelope>
Response
-
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <GetRangeResponse xmlns="http://schemas.microsoft.com/office/Excel/Server/WebServices/ExcelServerInternalService/"> <GetRangeResult> <StateId>2</StateId> <SpreadsheetData> <Workbook> <WorkbookOptions/> <Styles> <Style ID="sD"> <Font Size="11" FontName="Calibri" Color="#000000"/> </Style> <Style ID="1"> <Font Size="11" FontName="Calibri" Color="#000000"/> <Interior Color="#D9D9D9" Pattern="Solid"/> </Style> <Style ID="2"> <Font Size="11" FontName="Calibri" Color="#000000"/> <Alignment Horizontal="Left"/> <Interior Color="#D9D9D9" Pattern="Solid"/> </Style> <Style ID="3"> <Font Size="11" FontName="Calibri" Color="#000000"/> <Interior Color="#D9D9D9" Pattern="Solid"/> </Style> <Style ID="4"> <Font Size="11" FontName="Calibri" Color="#000000"/> <Alignment Horizontal="Left"/> <Interior Color="#D9D9D9" Pattern="Solid"/> </Style> <Style ID="5"> <Font Size="11" FontName="Calibri" Color="#000000"/> <Alignment Horizontal="Left"/> </Style> <Style ID="6"> <Font Size="11" FontName="Calibri" Color="#000000"/> </Style> <Style ID="7"> <Font Size="11" FontName="Calibri" Color="#000000"/> <Alignment Horizontal="Left"/> </Style> <Style ID="-1"> <Borders/> </Style> <Style ID="bD"> <Borders> <Border Weight="1" Position="Right" LineStyle="Continuous" Color="#D0D7E5"/> <Border Weight="1" Position="Bottom" LineStyle="Continuous" Color="#D0D7E5"/> </Borders> </Style> <Style ID="-3"> <Borders> <Border Weight="1" Position="Right" LineStyle="Continuous" Color="#D9D9D9"/> </Borders> </Style> <Style ID="-4"> <Borders> <Border Weight="1" Position="Right" LineStyle="Continuous" Color="#D0D7E5"/> </Borders> </Style> <Style ID="-5"> <Borders> <Border Weight="1" Position="Bottom" LineStyle="Continuous" Color="#D9D9D9"/> </Borders> </Style> <Style ID="-6"> <Borders> <Border Weight="1" Position="Right" LineStyle="Continuous" Color="#D9D9D9"/> <Border Weight="1" Position="Bottom" LineStyle="Continuous" Color="#D9D9D9"/> </Borders> </Style> <Style ID="-7"> <Borders> <Border Weight="1" Position="Bottom" LineStyle="Continuous" Color="#D0D7E5"/> </Borders> </Style> </Styles> <Worksheet ActiveSheet="1" Name="Sheet1"> <WorksheetOptions DisplayOutlines="1"/> <autofilters> <autofilter Row="0" ColFirst="0" Type="Sheet"> <item Index="0" DataType="Text" Name="Customer Geography"/> <item Index="1" Type="Filtered" Name=" Internet Sales Amount " CriteriaType="AboveAverage"/> </autofilter> </autofilters> <Table LastNonEmptyRow="70" LastNonEmptyColumn="30" CurrentFirstRow="1" FirstVisibleRow="1" LastVisibleRow="1048576" CurrentFirstColumn="1" FirstVisibleColumn="1" LastVisibleColumn="16384" SelectionTop="2" SelectionLeft="4" DefaultRowHeight="15" DefaultRowHeightPixels="20" DefaultColumnWidth="48" DefaultColumnWidthPixels="64" DefaultIndentWidth="6.75" DefaultIndentWidthPixels="9"> <Column Width="116.25" WidthPixels="155"/><Column Width="131.25" WidthPixels="175"/> <Column Width="48" WidthPixels="64" Span="27"/> <Row Height="15" HeightPixels="20"> <Cell StyleID="2" BorderID="-5"> <Data>Customer Geography</Data> </Cell> <Cell StyleID="4" BorderID="-6"> <Data xml:space="preserve"> Internet Sales Amount </Data> </Cell> </Row> <Row Height="15" HeightPixels="20"> <Cell StyleID="5"> <Data>New South Wales</Data> </Cell> <Cell StyleID="7" FormulaBarText="3934485.7265"> <Data xml:space="preserve"> $ 3,934,485.73 </Data> </Cell> </Row> <Row Height="15" HeightPixels="20"> <Cell StyleID="5"> <Data>Queensland</Data> </Cell> <Cell StyleID="7" FormulaBarText="1988415.0297"> <Data xml:space="preserve"> $ 1,988,415.03 </Data> </Cell> </Row> <Row Height="15" HeightPixels="20"> <Cell StyleID="5"> <Data>South Australia</Data> </Cell> <Cell StyleID="7" FormulaBarText="618255.8616"> <Data xml:space="preserve"> $ 618,255.86 </Data> </Cell> </Row> <Row Hidden="1"/> <Row Index="6" Height="15" HeightPixels="20"> <Cell StyleID="5"> <Data>Victoria</Data> </Cell> <Cell StyleID="7" FormulaBarText="2279906.0633"> <Data xml:space="preserve"> $ 2,279,906.06 </Data> </Cell> </Row> <Row Hidden="1"/> <Row Index="8" Height="15" HeightPixels="20"> <Cell StyleID="5"> <Data>British Columbia</Data> </Cell> <Cell StyleID="7" FormulaBarText="1955340.0996"> <Data xml:space="preserve"> $ 1,955,340.10 </Data> </Cell> </Row> <Row Hidden="1" Span="19"/> <Row Index="29" Height="15" HeightPixels="20"> <Cell StyleID="5"> <Data>Hessen</Data> </Cell> <Cell StyleID="7" FormulaBarText="794876.0774"> <Data xml:space="preserve"> $ 794,876.08 </Data> </Cell> </Row> <Row Hidden="1"/> <Row Index="31" Height="15" HeightPixels="20"> <Cell StyleID="5"> <Data>Saarland</Data> </Cell> <Cell StyleID="7" FormulaBarText="653087.484"> <Data xml:space="preserve"> $ 653,087.48 </Data> </Cell> </Row> <Row Height="15" HeightPixels="20"> <Cell StyleID="5"> <Data>England</Data> </Cell> <Cell StyleID="7" FormulaBarText="3391712.2109"> <Data xml:space="preserve"> $ 3,391,712.21 </Data> </Cell> </Row> <Row Hidden="1" Span="1"/> <Row Index="35" Height="15" HeightPixels="20"> <Cell StyleID="5"> <Data>California</Data> </Cell> <Cell StyleID="7" FormulaBarText="5714257.6926"> <Data xml:space="preserve"> $ 5,714,257.69 </Data> </Cell> </Row> <Row Hidden="1" Span="11"/> <Row Index="48" Height="15" HeightPixels="20"> <Cell StyleID="5"> <Data>Oregon</Data> </Cell> <Cell StyleID="7" FormulaBarText="1170991.5397"> <Data xml:space="preserve"> $ 1,170,991.54 </Data> </Cell> </Row> <Row Hidden="1" Span="3"/> <Row Index="53" Height="15" HeightPixels="20"> <Cell StyleID="5"> <Data>Washington</Data> </Cell> <Cell StyleID="7" FormulaBarText="2467248.3415"> <Data xml:space="preserve"> $ 2,467,248.34 </Data> </Cell> </Row> <Row Hidden="1"/> <Row Index="55" Height="15" HeightPixels="20"> <Cell StyleID="6" Index="2"/> </Row> <Row Height="15" HeightPixels="20"><Cell StyleID="6" Index="2"/> </Row> <Row Height="15" HeightPixels="20"><Cell StyleID="6" Index="2"/> </Row> <Row Height="15" HeightPixels="20"> <Cell StyleID="6" Index="2"/> </Row> <Row Height="15" HeightPixels="20"><Cell StyleID="6" Index="2"/> </Row> <Row Height="15" HeightPixels="20"><Cell StyleID="6" Index="2"/> </Row> <Row Height="15" HeightPixels="20"><Cell StyleID="6" Index="2"/> </Row> <Row Height="15" HeightPixels="20"> <Cell StyleID="6" Index="2"/> </Row> <Row Height="15" HeightPixels="20"> <Cell StyleID="6" Index="2"/> </Row> <Row Height="15" HeightPixels="20"> <Cell StyleID="6" Index="2"/> </Row> <Row Height="15" HeightPixels="20"> <Cell StyleID="6" Index="2"/> </Row> <Row Height="15" HeightPixels="20"><Cell StyleID="6" Index="2"/> </Row> <Row Height="15" HeightPixels="20"><Cell StyleID="6" Index="2"/> </Row> <Row Height="15" HeightPixels="20"><Cell StyleID="6" Index="2"/> </Row> <Row Height="15" HeightPixels="20"><Cell StyleID="6" Index="2"/> </Row> <Row Height="15" HeightPixels="20"><Cell StyleID="6" Index="2"/> </Row> </Table> </Worksheet> <Worksheet Name="Sheet2"><WorksheetOptions DisplayOutlines="1"/> </Worksheet> <Worksheet Name="Sheet3"> <WorksheetOptions DisplayOutlines="1"/> </Worksheet> </Workbook> </SpreadsheetData> <HealthInformation> <StateFlags></StateFlags> <HealthScore>0</HealthScore> </HealthInformation> <SecondsBeforeNextPoll>60</SecondsBeforeNextPoll> <EditSessionIsDirty>false</EditSessionIsDirty> <EditSessionHasMultipleUsers>false</EditSessionHasMultipleUsers> </GetRangeResult> </GetRangeResponse> </s:Body> </s:Envelope>
Applying the sort
Request
-
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <SortFilterColumn xmlns="http://schemas.microsoft.com/office/Excel/Server/WebServices/ExcelServerInternalService/"> <parameter> <WorkbookId>1.V21.2l4QQ/7ySliVKuAUptXrY90.5.en-US5.en-US73.+0480#0000-11-00-01T02:00:00:0000#+0000#0000-03-00-02T02:00:00:0000#-006036.bebf895a-f22a-49d5-b8b0-f65d01d0a3991.N</WorkbookId> <StateId>-1</StateId> <Confirmation>Blank</Confirmation> <ConfirmationChoice>false</ConfirmationChoice> <ProtocolClientId>ms-ewa</ProtocolClientId> <RequestSiteId>bebf895a-f22a-49d5-b8b0-f65d01d0a399</RequestSiteId> <CompleteResponseTimeout>0</CompleteResponseTimeout> <Flags></Flags> </parameter> <autoFilterOptions> <AutoFilterType>Sheet</AutoFilterType> <CriteriaType>Nil</CriteriaType> <Id>0</Id> <SheetName>Sheet1</SheetName> <Column>2</Column> <NamedObjectView>false</NamedObjectView> </autoFilterOptions> <ascending>true</ascending> </SortFilterColumn> </s:Body> </s:Envelope>
Response
-
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <SortFilterColumnResponse xmlns="http://schemas.microsoft.com/office/Excel/Server/WebServices/ExcelServerInternalService/"> <SortFilterColumnResult> <StateId>3</StateId> <HealthInformation> <StateFlags></StateFlags> <HealthScore>0</HealthScore> </HealthInformation> <SecondsBeforeNextPoll>60</SecondsBeforeNextPoll> <EditSessionIsDirty>false</EditSessionIsDirty> <EditSessionHasMultipleUsers>false</EditSessionHasMultipleUsers> </SortFilterColumnResult> </SortFilterColumnResponse> </s:Body> </s:Envelope>
Fetching the XML
Request
-
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <GetRange xmlns="http://schemas.microsoft.com/office/Excel/Server/WebServices/ExcelServerInternalService/"> <parameter> <WorkbookId>1.V21.2l4QQ/7ySliVKuAUptXrY90.5.en-US5.en-US73.+0480#0000-11-00-01T02:00:00:0000#+0000#0000-03-00-02T02:00:00:0000#-006036.bebf895a-f22a-49d5-b8b0-f65d01d0a3991.N</WorkbookId> <StateId>3</StateId> <VisibleSheetRangeRequest> <SheetName>Sheet1</SheetName> <FirstRow>0</FirstRow> <VisibleRowsRequested>28</VisibleRowsRequested> <FirstColumn>0</FirstColumn> <VisibleColumnsRequested>30</VisibleColumnsRequested> <VisibleFirstRowOffset>0</VisibleFirstRowOffset> <VisibleFirstColumnOffset>0</VisibleFirstColumnOffset> <NoAutoAdjustToPublishedUsedRange>true</NoAutoAdjustToPublishedUsedRange> <NeedAllBorderValues>false</NeedAllBorderValues> <ChartsOnly>false</ChartsOnly> </VisibleSheetRangeRequest> <Confirmation>Blank</Confirmation> <ConfirmationChoice>false</ConfirmationChoice> <ProtocolClientId>ms-ewa</ProtocolClientId> <RequestSiteId>bebf895a-f22a-49d5-b8b0-f65d01d0a399</RequestSiteId> <CompleteResponseTimeout>0</CompleteResponseTimeout> <Flags></Flags> </parameter> </GetRange> </s:Body> </s:Envelope>
Response
-
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <GetRangeResponse xmlns="http://schemas.microsoft.com/office/Excel/Server/WebServices/ExcelServerInternalService/"> <GetRangeResult> <StateId>3</StateId> <SpreadsheetData> <Workbook> <WorkbookOptions/> <Styles> <Style ID="sD"> <Font Size="11" FontName="Calibri" Color="#000000"/> </Style> <Style ID="1"> <Font Size="11" FontName="Calibri" Color="#000000"/> <Interior Color="#D9D9D9" Pattern="Solid"/> </Style> <Style ID="2"> <Font Size="11" FontName="Calibri" Color="#000000"/> <Alignment Horizontal="Left"/> <Interior Color="#D9D9D9" Pattern="Solid"/> </Style> <Style ID="3"> <Font Size="11" FontName="Calibri" Color="#000000"/> <Interior Color="#D9D9D9" Pattern="Solid"/> </Style> <Style ID="4"> <Font Size="11" FontName="Calibri" Color="#000000"/> <Alignment Horizontal="Left"/> <Interior Color="#D9D9D9" Pattern="Solid"/> </Style> <Style ID="5"> <Font Size="11" FontName="Calibri" Color="#000000"/> <Alignment Horizontal="Left"/> </Style> <Style ID="6"> <Font Size="11" FontName="Calibri" Color="#000000"/> </Style> <Style ID="7"> <Font Size="11" FontName="Calibri" Color="#000000"/> <Alignment Horizontal="Left"/> </Style> <Style ID="-1"> <Borders/> </Style> <Style ID="bD"> <Borders> <Border Weight="1" Position="Right" LineStyle="Continuous" Color="#D0D7E5"/> <Border Weight="1" Position="Bottom" LineStyle="Continuous" Color="#D0D7E5"/> </Borders> </Style> <Style ID="-3"> <Borders> <Border Weight="1" Position="Right" LineStyle="Continuous" Color="#D9D9D9"/> </Borders> </Style> <Style ID="-4"> <Borders> <Border Weight="1" Position="Right" LineStyle="Continuous" Color="#D0D7E5"/> </Borders> </Style> <Style ID="-5"> <Borders> <Border Weight="1" Position="Bottom" LineStyle="Continuous" Color="#D9D9D9"/> </Borders> </Style> <Style ID="-6"> <Borders> <Border Weight="1" Position="Right" LineStyle="Continuous" Color="#D9D9D9"/> <Border Weight="1" Position="Bottom" LineStyle="Continuous" Color="#D9D9D9"/> </Borders> </Style> <Style ID="-7"> <Borders> <Border Weight="1" Position="Bottom" LineStyle="Continuous" Color="#D0D7E5"/> </Borders> </Style> </Styles> <Worksheet ActiveSheet="1" Name="Sheet1"> <WorksheetOptions DisplayOutlines="1"/> <autofilters> <autofilter Row="0" ColFirst="0" Type="Sheet"> <item Index="0" DataType="Text" Name="Customer Geography"/> <item Index="1" Type="BothAsc" Name=" Internet Sales Amount " CriteriaType="AboveAverage"/> </autofilter> </autofilters> <Table LastNonEmptyRow="70" LastNonEmptyColumn="30" CurrentFirstRow="1" FirstVisibleRow="1" LastVisibleRow="1048576" CurrentFirstColumn="1" FirstVisibleColumn="1" LastVisibleColumn="16384" SelectionTop="2" SelectionLeft="4" DefaultRowHeight="15" DefaultRowHeightPixels="20" DefaultColumnWidth="48" DefaultColumnWidthPixels="64" DefaultIndentWidth="6.75" DefaultIndentWidthPixels="9"> <Column Width="116.25" WidthPixels="155"/> <Column Width="131.25" WidthPixels="175"/> <Column Width="48" WidthPixels="64" Span="27"/> <Row Height="15" HeightPixels="20"> <Cell StyleID="2" BorderID="-5"> <Data>Customer Geography</Data> </Cell> <Cell StyleID="4" BorderID="-6"> <Data xml:space="preserve"> Internet Sales Amount </Data> </Cell> </Row> <Row Height="15" HeightPixels="20"> <Cell StyleID="5"> <Data>South Australia</Data> </Cell> <Cell StyleID="7" FormulaBarText="618255.8616"> <Data xml:space="preserve"> $ 618,255.86 </Data> </Cell> </Row> <Row Height="15" HeightPixels="20"> <Cell StyleID="5"> <Data>Saarland</Data> </Cell> <Cell StyleID="7" FormulaBarText="653087.484"> <Data xml:space="preserve"> $ 653,087.48 </Data> </Cell> </Row> <Row Height="15" HeightPixels="20"> <Cell StyleID="5"> <Data>Hessen</Data> </Cell> <Cell StyleID="7" FormulaBarText="794876.0774"> <Data xml:space="preserve"> $ 794,876.08 </Data> </Cell> </Row> <Row Hidden="1"/> <Row Index="6" Height="15" HeightPixels="20"> <Cell StyleID="5"> <Data>Oregon</Data> </Cell> <Cell StyleID="7" FormulaBarText="1170991.5397"> <Data xml:space="preserve"> $ 1,170,991.54 </Data> </Cell> </Row> <Row Hidden="1"/> <Row Index="8" Height="15" HeightPixels="20"> <Cell StyleID="5"> <Data>British Columbia</Data> </Cell> <Cell StyleID="7" FormulaBarText="1955340.0996"> <Data xml:space="preserve"> $ 1,955,340.10 </Data> </Cell> </Row> <Row Hidden="1" Span="19"/> <Row Index="29" Height="15" HeightPixels="20"> <Cell StyleID="5"> <Data>Queensland</Data> </Cell> <Cell StyleID="7" FormulaBarText="1988415.0297"> <Data xml:space="preserve"> $ 1,988,415.03 </Data> </Cell> </Row> <Row Hidden="1"/> <Row Index="31" Height="15" HeightPixels="20"> <Cell StyleID="5"> <Data>Victoria</Data> </Cell> <Cell StyleID="7" FormulaBarText="2279906.0633"> <Data xml:space="preserve"> $ 2,279,906.06 </Data> </Cell> </Row> <Row Height="15" HeightPixels="20"> <Cell StyleID="5"> <Data>Washington</Data> </Cell> <Cell StyleID="7" FormulaBarText="2467248.3415"> <Data xml:space="preserve"> $ 2,467,248.34 </Data> </Cell> </Row> <Row Hidden="1" Span="1"/> <Row Index="35" Height="15" HeightPixels="20"> <Cell StyleID="5"> <Data>England</Data> </Cell> <Cell StyleID="7" FormulaBarText="3391712.2109"> <Data xml:space="preserve"> $ 3,391,712.21 </Data> </Cell> </Row> <Row Hidden="1" Span="11"/> <Row Index="48" Height="15" HeightPixels="20"> <Cell StyleID="5"> <Data>New South Wales</Data> </Cell> <Cell StyleID="7" FormulaBarText="3934485.7265"> <Data xml:space="preserve"> $ 3,934,485.73 </Data> </Cell> </Row> <Row Hidden="1" Span="3"/> <Row Index="53" Height="15" HeightPixels="20"> <Cell StyleID="5"> <Data>California</Data> </Cell> <Cell StyleID="7" FormulaBarText="5714257.6926"> <Data xml:space="preserve"> $ 5,714,257.69 </Data> </Cell> </Row> <Row Hidden="1"/> <Row Index="55" Height="15" HeightPixels="20"> <Cell StyleID="6" Index="2"/> </Row> <Row Height="15" HeightPixels="20"> <Cell StyleID="6" Index="2"/> </Row> <Row Height="15" HeightPixels="20"> <Cell StyleID="6" Index="2"/> </Row> <Row Height="15" HeightPixels="20"> <Cell StyleID="6" Index="2"/> </Row> <Row Height="15" HeightPixels="20"> <Cell StyleID="6" Index="2"/> </Row> <Row Height="15" HeightPixels="20"> <Cell StyleID="6" Index="2"/> </Row> <Row Height="15" HeightPixels="20"> <Cell StyleID="6" Index="2"/> </Row> <Row Height="15" HeightPixels="20"> <Cell StyleID="6" Index="2"/> </Row> <Row Height="15" HeightPixels="20"> <Cell StyleID="6" Index="2"/> </Row> <Row Height="15" HeightPixels="20"> <Cell StyleID="6" Index="2"/> </Row> <Row Height="15" HeightPixels="20"> <Cell StyleID="6" Index="2"/> </Row> <Row Height="15" HeightPixels="20"> <Cell StyleID="6" Index="2"/> </Row> <Row Height="15" HeightPixels="20"> <Cell StyleID="6" Index="2"/> </Row> <Row Height="15" HeightPixels="20"> <Cell StyleID="6" Index="2"/> </Row> <Row Height="15" HeightPixels="20"> <Cell StyleID="6" Index="2"/> </Row> <Row Height="15" HeightPixels="20"> <Cell StyleID="6" Index="2"/> </Row> </Table> </Worksheet> <Worksheet Name="Sheet2"> <WorksheetOptions DisplayOutlines="1"/> </Worksheet> <Worksheet Name="Sheet3"> <WorksheetOptions DisplayOutlines="1"/> </Worksheet> </Workbook> </SpreadsheetData> <HealthInformation> <StateFlags></StateFlags> <HealthScore>0</HealthScore> </HealthInformation> <SecondsBeforeNextPoll>60</SecondsBeforeNextPoll> <EditSessionIsDirty>false</EditSessionIsDirty> <EditSessionHasMultipleUsers>false</EditSessionHasMultipleUsers> </GetRangeResult> </GetRangeResponse> </s:Body> </s:Envelope>