smartsheet-api

Smartsheet Data Tracker: AttributeError: 'dict' object has no attribute 'append'

时光怂恿深爱的人放手 提交于 2019-12-11 12:14:07
问题 I am new to Python and I'm working with Smartsheet Data Tracker to update a sheet from a CSV file. I have problems about the array list management in Python; I don't know about this error, I was reading about this error on StackOverflow but I don't understand it: The error: "File "C:\Users\David\DataTraker\connectors\CSVCon.py", line 61, in __init__ self.csvData.append(readerRow) AttributeError: 'dict' object has no attribute 'append'" And my code: def __init__(self, sourceConfig): self

Building whole sheet programmatically with Python SDK

自古美人都是妖i 提交于 2019-12-11 09:28:24
问题 I'm trying to build a whole sheet from scratch, and stay efficient while doing it. For that purpose, I am trying to rely on bulk operations. I can build a massive list of rows and add them easily using add_rows() . However, I need some rows to be children of other rows, and neither row.indent nor row.parent_id seem possible to set on new rows (since the fresh rows don't have an id yet). I could possibly: create the parent row > add_rows() > get_sheet() > find the row id in sheet > create the

How to get the array of sheet ids in a folder with python

橙三吉。 提交于 2019-12-10 18:49:19
问题 When I try to get the id array from the get.folder() call (by using folder = folder.sheets.id), I get the answer: "AttributeError: 'TypedList' object has no attribute 'id'" I'm not sure what function to call in python to get the array of sheet ids in the folder. I am trying to do this with the python smartsheet sdk, but I am not sure exactly how to format it. inc_list = ['all'] # you can add other parameters here, separated by a comma response = ss_client.Folders.copy_folder( folderID, #

cannot update row using Smartsheet API

[亡魂溺海] 提交于 2019-12-08 08:23:06
问题 I'm using the Python example at http://smartsheet-platform.github.io/api-docs/?python#update-row(s) nearly verbatim. The difference is I'm updating only one cell in one row. I can see the value change in the variable row_a but the row does not get updated in the Smartsheet itself. Here is my code, which is nearly identical to the code posted in the API guide: row_a = smartsheet.Sheets.get_row(sheetId, 916467282667396) cell_a = row_a.get_column(5937660066850692) cell_a.value = 'new value' row

Setting a batch of parents/sibblings in one call

给你一囗甜甜゛ 提交于 2019-12-08 03:22:30
问题 I'm building an Google Script that automatically writes a Google Spreadsheet to Smartsheet, but with the parents/sibbling already formated, no need for manual indeting, since I already have to do this in the Spreadsheet, trough a numbered column. I managed to write to the Smartsheet, but I can't seem to figure out how to send a batch (600+) of lines with parents/sibblings set, which are in the same urlFetch call. Some questions which should solve my problem: Is it possible to determine

Setting a batch of parents/sibblings in one call

六月ゝ 毕业季﹏ 提交于 2019-12-06 15:49:30
I'm building an Google Script that automatically writes a Google Spreadsheet to Smartsheet, but with the parents/sibbling already formated, no need for manual indeting, since I already have to do this in the Spreadsheet, trough a numbered column. I managed to write to the Smartsheet, but I can't seem to figure out how to send a batch (600+) of lines with parents/sibblings set, which are in the same urlFetch call. Some questions which should solve my problem: Is it possible to determine/specify the "rowId" that I'm about to include? Is it possible to set "parentRowNumber" when providing the row

Error: adding rows with smartsheet API

蹲街弑〆低调 提交于 2019-12-06 02:42:12
I can't seem to get a add row(s) to work. I get the following error, but I believe the data is formatted correctly. Thanks in advance! {"errorCode":1008,"message":"Unable to parse request. The following error occurred: Request body must be either a JSON object or JSON array."} POST https://api.smartsheet.com/1.1/sheet/ {sheetId}/rows ContentType=application/json [ { "toBottom" : true, "cells" : [ {"columnId" : "328984295696260", "value" : 888.0}, {"columnId" : 4832583923066756, "value" : 100.0} ] }, { "toBottom" : true, "cells": [ {"columnId" : "328984295696260", "value" : 999.0}, {"columnId"

Update cells in smartsheet

雨燕双飞 提交于 2019-12-05 02:44:49
问题 I am trying to update some cells in an existing SmartSheet sheet with PHP. It's no problem to add new lines but I can't get the correct JSON for updating. My code at this moment: $ch = curl_init("https://api.smartsheet.com/1.1/sheet/1234567890/rows/"); $header = array("Authorization: Bearer xxxxxxxxxxx", "Content-Type: application/json", "Assume-User: xxxx%40xxxx.com"); $name = 'MyName'; $fields = '{"rowNumber":1, "columnId": 1234567890, "value": "'.$name.'", "displayValue": "'.$name.'"}';

Update cells in smartsheet

末鹿安然 提交于 2019-12-03 17:28:29
I am trying to update some cells in an existing SmartSheet sheet with PHP. It's no problem to add new lines but I can't get the correct JSON for updating. My code at this moment: $ch = curl_init("https://api.smartsheet.com/1.1/sheet/1234567890/rows/"); $header = array("Authorization: Bearer xxxxxxxxxxx", "Content-Type: application/json", "Assume-User: xxxx%40xxxx.com"); $name = 'MyName'; $fields = '{"rowNumber":1, "columnId": 1234567890, "value": "'.$name.'", "displayValue": "'.$name.'"}'; curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $header); curl

Error while trying to use an API. java.lang.NoSuchFieldError: INSTANCE

旧时模样 提交于 2019-11-28 12:09:47
I am trying to connect to the smartsheet api using a java program. Initially I had problems with the site certificate which was resolved by adding it to the java keystore. Now when I am trying to run my code, I get the following error. Exception in thread "main" java.lang.NoSuchFieldError: INSTANCE at org.apache.http.conn.ssl.SSLConnectionSocketFactory.<clinit>(SSLConnectionSocketFactory.java:144) at org.apache.http.impl.client.HttpClientBuilder.build(HttpClientBuilder.java:955) at org.apache.http.impl.client.HttpClients.createDefault(HttpClients.java:58) at com.smartsheet.api.internal.http