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.5K Get Help
- 424 Global Discussions
- 136 Industry Talk
- 465 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 145 Just for fun
- 62 Community Job Board
- 465 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 301 Events
- 39 Webinars
- 7.3K Forum Archives