AnsweredAssumed Answered

Has anyone been able to get excelservices setrange to work?

Question asked by wolflake on Jun 13, 2016
Latest reply on Aug 30, 2016 by mlauer

I can get setcell to work but if I need to write to 200 cells that's 200 trips back and forth to the server while setrange would be one trip.

The error I get is that "The size of the provided array does not match the size and shape of the destination range."  Even when I try setting a single cell I still get this error.  I've tried lots of variations but nothing works. I'm hoping someone has had success with this and can give me an example that works so I can model my workflow after it. Ideally I'd like examples of both a single column or row and a matrix of columns and rows but I'd be very happy if I could just get one column to work.

 

My issue is with the <anyType>xml</anyType>

<?xml
version="1.0" encoding="utf-8"?>

<soap:Envelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:m="http://schemas.microsoft.com/office/excel/server/webservices">

  <soap:Header>

  </soap:Header>

  <soap:Body>

    <m:SetRangeA1>

     <m:sessionId>string</m:sessionId>

     <m:sheetName>string</m:sheetName>

     <m:rangeName>string</m:rangeName>

      <m:rangeValues>

        <anyType>xml</anyType>

      </m:rangeValues>

    </m:SetRangeA1>

  </soap:Body>

</soap:Envelope>

Outcomes