microsoftgraph / microsoftgraph/msgraph-sdk-python

WorkbookTableColumn doesn't accept "values"

Open
#896 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area:documentation type:bug
Dominant language
Python
Stars
630
Forks
96
Avg merge
15h 20m
Merged PRs (30d)
3

Description

Describe the bug

Using same syntax than in this code snippet from documentation gives error: "TypeError: WorkbookTableColumn.init() got an unexpected keyword argument 'values'"

# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.workbook_table_column import WorkbookTableColumn
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = WorkbookTableColumn(
	id = "99",
	name = "name-value",
	index = 99,
	values = "values-value",
)

result = await graph_client.drives.by_drive_id('drive-id').items.by_drive_item_id('driveItem-id').workbook.tables.by_workbook_table_id('workbookTable-id').columns.post(request_body)

I can run the code without "values".

Expected behavior

I want to add also values similar to what I can via Graph Expoler.

How to reproduce

Try to add column to Excel with values.

SDK Version

1.7.0

Latest version known to work for scenario above?

No response

Known Workarounds

Using Graph Explorer

Debug output
Click to expand log ```
request_body = WorkbookTableColumn(

TypeError: WorkbookTableColumn.init() got an unexpected keyword argument 'values'

</details>


### Configuration

WSL 

### Other information

_No response_

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the WorkbookTableColumn definition used by the Python SDK and compare its accepted constructor fields with the documentation snippet for SDK version 1.7.0. Reproduce the request with and without values, then verify that a column can be created with values as shown in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.