Issue When importing an EXCEL file with API ? (switched indent !!)
Hi all,
I have a question about what seems to be an issue in smartsheet API.
I am surprised not to have found this bug in the forums because the Excel import in smartsheet must be very used?
Here is the issue :
When you import an Excel file containing indentation, with this script :
https://smartsheet.redoc.ly/tag/import/
curl https://api.smartsheet.com/2.0/folders/{folderId}/sheets/import?sheetName=MarketingProgressReport&headerRowIndex=0&primaryColumnIndex=0 \ -H "Authorization: Bearer JKlMNOpQ12RStUVwxYZAbcde3F5g6hijklM789" \ -H "Content-Disposition: attachment" \ -H "Content-Type: text/csv" \ -X POST \ --data-binary @ProgressReport.csv
Then, all the indentation are switched, ONLY when you use the headerRowIndex=0 Option, to set the column title with the first Row, see below.
Any idea ? did i miss something ?
Thx for your help
Best Answer
-
Hi @Fabrice
I have also identified such a problem when importing a grouped Excel sheet into Smartsheet using the API and specifying a Header Row.
Here is the Python function code to fix this problem
- First, import with header_row_index=None.
- Next, update the Columns of the sheet with the values of the header_row cells.
- Finally, delete the unnecessary rows.
Answers
-
Hi @Fabrice
I have also identified such a problem when importing a grouped Excel sheet into Smartsheet using the API and specifying a Header Row.
Here is the Python function code to fix this problem
- First, import with header_row_index=None.
- Next, update the Columns of the sheet with the values of the header_row cells.
- Finally, delete the unnecessary rows.
-
Hi @Junichiro
Thx for this answer and the link with the fix code 👍️
I developped also my side such a python function: It is functionnal, but it slows down a lot the import when you have a lot of column. (each column update takes about 1 sec)
I Also opened a ticket with smartsheet Support for this issue, i hope smartsheet will fix the issue !
kind regards
Fabrice
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 439 Global Discussions
- 138 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 488 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives