Retrieving Strikethrough Formatting with Python SDK
Hi all,
I'm using the Smartsheet Python SDK to fetch data from my sheets. While the data retrieval works well, I'm encountering a limitation where cell formatting, specifically strikethrough, isn't captured.
Currently, the retrieved data appears without the strikethrough even though it's displayed that way in the sheet.
Is there a way to access cell formatting information like strikethrough using the SDK?
As an alternative, are there any suggested workarounds to identify rows marked for cancellation (potentially via a specific value in a designated column)?
Thanks in advance for any insights!
Best Answer
-
Hi @Dev106
You can get formatting information by specifying include when you get a sheet.
sheet = smartsheet_client.Sheets.get_sheet( sheet_id, include = ['format'] )
Then, if you access a cell, the cell has formatting information like this;
{"columnId": 3564341938048900, "displayValue": "Test 1", "format": ",,,,,1,,,,,,,,,,,", "value": "Test 1"}
Then, referencing the format description table, you can determine which formats are applied to the cell, strikethrough, in this example.
Answers
-
Hi @Dev106
You can get formatting information by specifying include when you get a sheet.
sheet = smartsheet_client.Sheets.get_sheet( sheet_id, include = ['format'] )
Then, if you access a cell, the cell has formatting information like this;
{"columnId": 3564341938048900, "displayValue": "Test 1", "format": ",,,,,1,,,,,,,,,,,", "value": "Test 1"}
Then, referencing the format description table, you can determine which formats are applied to the cell, strikethrough, in this example.
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 472 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 496 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives