Please add CRUD methods to RangeWithAddressRequestBuilder subclass and please re-add "values" property to WorkbookRange subclass
Is your feature request related to a problem? Please describe the problem.
With version 1.5.4, I am unable to perform CRUD operations against a user-defined Excel worksheet range address (i.e., A1:B2) using the RangeWithAddressRequestBuilder and WorkbookRange subclasses in the Python SDK. Specifically, I am unable to read, update, and delete Excel worksheet cell data in a user-defined range address. Please note that I am able to perform these actions using Graph Explorer.
Describe the solution you'd like.
- Can PATCH and DELETE methods be added to the RangeWithAddressRequestBuilder subclass?
- Can the "values" property be re-added to the WorkbookRange subclass?
Additional context?
-
Currently, the RangeWithAddressRequestBuilder subclass has methods to build a GET request that is sent to the MS Graph API, but this subclass does not have update or delete methods to send PATCH or DELETE requests.
-
In the recently updated Python SDK, the WorkbookRange subclass no longer contains the "values" property. Previously, with the "values" property, a GET request could be sent to retrieve raw values from a given Excel range address in the Python SDK. Now that the "values" property is no longer in the WorkbookRange subclass, a user can no longer submit a GET request for raw values at a given range address.
Hello @dianalingtung thanks for raising this.
On Values property: - this was removed as it gave challenges with serialization considering the type information was wrong, the values property for now can be obtained from the additional_data
Hello @dianalingtung thanks for raising this.
On Values property: - this was removed as it gave challenges with serialization considering the type information was wrong, the values property for now can be obtained from the additional_data
@shemogumbe Shem,
Thank you for the response.
While the values property can be obtained from the additional_data property for now, is there any chance you could add PATCH and DELETE methods for the RangeWithAddressRequestBuilder? Is there an alternative request builder method that could be called to PATCH/DELETE (for example by referencing a raw Graph API call)?
Thank you,
Diana
Hi,
Is there any update on this request? I would like to bring data into an Excel spreadsheet using the patch method with the Python SDK.
I can execute the following in Graph Explorer but am unable to do so in the Python SDK using additional_data. Since the RangeWithAddressRequestBuilder does not have a patch method (it currently only has a get method), is there another method that can be called for this type of request?
Request: https://graph.microsoft.com/v1.0/drives/{drive id}/items/{drive item id}/workbook/worksheets/{worksheet id}/range(address='A1')
Request body: {"values": [["hello"]]}
Edited: I am able to send a single request to patch one value to an Excel range. I would like to know if additional_data can be used to patch a list of data such as:
{"values": [["hello"], ["bye"]]}
If so, how should the additional_data be written for the following code in Python?
request_body = File(additional_data={data here})
Thank you,
Diana