Importing a .csv file as a smartsheet via the API
Hi,
When I import a .csv file via the API, some of the column types are thrown off. I have one column that is strictly text (should have the type TEXT_NUMBER), but smartsheets is assigning that column the column_type PICKLIST. How do I prevent this from happening during import? Having to always import, then find the column_id that I want to update, and then updating via the API isn't ideal.
Thanks!
Comments
-
Do any of the values in the column repeat? Do you see this same behavior happen when importing in Smartsheet in your browser? When importing a CSV file where a column has the same collection of values going down the whole row the column will be turned into a Dropdown column or PICKLIST for the API with the collection of values as the options for the Dropdown column.
For example, if your column has "Not Started," "In Progress," and "Complete" as the values all the way down with varying amounts of each that column would be imported as a Dropdown column with the options being "Not Started," "In Progress," and "Complete."
There isn't a method to override this behavior importing via the API.
-
What would the reason be for a column being imported as a CHECKBOX when all the values are numeric integers {0,1,2,6,14....etc...}?
-
I haven't been able to reproduce this behavior myself with a column coming in as a Checkbox type when there is integers entered in it. It might be due to some formatting of the column in Excel? To troubleshoot this more directly with you I'd suggest reaching out to the Support team and they can help you.
-
After importing the csv you can explicitly set the column type. Get the sheet and then iterate through the column list using column update.
Look me up if you want any help
-Jeremiah Horstick
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 62.8K Get Help
- 376 Global Discussions
- 207 Industry Talk
- 440 Announcements
- 4.5K Ideas & Feature Requests
- 139 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 449 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 284 Events
- 33 Webinars
- 7.3K Forum Archives