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
- Smartsheet Customer Resources
- 64.2K Get Help
- 419 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 142 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives