smartsheet / smartsheet-csharp-sdk

Library that uses C# to connect to Smartsheet services.
Apache License 2.0
12 stars 6 forks source link

ImportCsvSheet and ImportXlsSheet are very different implmentations from the public API. #61

Open timothodge opened 4 months ago

timothodge commented 4 months ago

The public API docs say that these resources should go to sheets\import instead the C# sdk actually requires a folderId.

This seems to be an enhancement to make sure you import a CSV/XSLX into the right place.

Need to find out who need to update the API docs or just go fix the C# example ourselves.

https://smartsheet.redoc.ly/tag/import#operation/import-sheet-into-sheets-folder

jsimonsmartsheet commented 1 month ago

@timothodge I don't really understand what this is talking about There are three versions of import csv (confusing)

https://api.smartsheet.com/2.0/folders/{folderId}/sheets/import ImportCsvSheet(string file, string? sheetName = null, int? headerRowIndex = null, int? primaryColumnIndex = null);

https://api.smartsheet.com/2.0/sheets/import <- no folderid SheetResources.ImportCsvSheet(string file, string? sheetName, int? headerRowIndex, int? primaryColumnIndex)

https://api.smartsheet.com/2.0/workspaces/{workspaceId}/sheets/import WorkspaceSheetResources.ImportCsvSheet(long workspaceId, string file, string? sheetName = null, int? headerRowIndex = null, int? primaryColumnIndex = null)

timothodge commented 1 month ago

@jsimonsmartsheet I also can't figure out what I was trying to say. I wonder if I was pointing out some confusion about all the import methods. I am happy to close this issue given that I can't remember what I was trying to get across.