msgraph-sdk-python-core icon indicating copy to clipboard operation
msgraph-sdk-python-core copied to clipboard

Excel Workbook API returns empty rows in additional_data

Open DanarajMSFT opened this issue 1 year ago • 1 comments

Request is successful when calling the MSGraph Excel API - but the additional_data field is always empty. Calling the Excel Graph API to read Excel workbook table rows.

This is the code:

drive = await client.drives.by_drive_id('id').items.by_drive_item_id('id').workbook.tables.by_workbook_table_id('1').rows.item_at_with_index(6).get(request_configuration = request_configuration)

The additional_data is always {} even though my Excel file has over 6K rows. EAPI

DanarajMSFT avatar Mar 10 '24 15:03 DanarajMSFT

Possibly related to https://github.com/microsoftgraph/msgraph-metadata/issues/596

andrueastman avatar Apr 15 '24 09:04 andrueastman

Hello @DanarajMSFT Thanks for using the SDK and for raising this.

On trying to reproduce this, I notice that there are values inside additional data.

For extra context, the issue https://github.com/microsoftgraph/msgraph-metadata/issues/596 resolved a number of issues where some fields could not be serialized to a known type and were all dumped in additional data.

Below is the code I ran to reproduce this:


ws_table_data = await user_client.drives.by_drive_id(
            'b!axQ8g1AhEkGm7Ht2Y38AhzIGJDVp6iNNh8Dx8AnFpCdiL9C2pDizRK99X3lsfUGp'
        ).items.by_drive_item_id('01RUWSUNVQRG2DEME72BFLFAGQOXBAKG4I'
                                 ).workbook.tables.by_workbook_table_id(
                                     "{1790D558-62DD-49A3-A430-371258F8966E}"
                                 ).rows.item_at_with_index(4).get()

        print(
            f"Worksheet tables Additional data : {ws_table_data.additional_data.values()}"
        )

Response

Graph Scopes: ['https://graph.microsoft.com/.default']
Worksheet tables Additional data : dict_values(['https://graph.microsoft.com/v1.0/$metadata#microsoft.graph.workbookTableRow', "/drives('b%21axQ8g1AhEkGm7Ht2Y38AhzIGJDVp6iNNh8Dx8AnFpCdiL9C2pDizRK99X3lsfUGp')/items('01RUWSUNVQRG2DEME72BFLFAGQOXBAKG4I')/workbook/tables(%27%7B1790D558-62DD-49A3-A430-371258F8966E%7D%27)/rows/itemAt(index=4)", [[43157, 'Central', 'Timothy', 'David', 'Cell Phone', 27, 225, 43157, 'Central', 'Timothy', 'David', 'Cell Phone', 27, 225, 6075]]])
(drive_env)

Aso, which version of the SDK are you using, if later than 1.4.0, consider upgrading as, hsould the issue https://github.com/microsoftgraph/msgraph-metadata/issues/596 been the issue, it was resolved at around release 1.4.0

shemogumbe avatar Aug 29 '24 12:08 shemogumbe