/// <summary> /// Update cell's style. /// </summary> /// <param name="name">The workbook name.</param> /// <param name="sheetName">The worksheet name.</param> /// <param name="cellName">The cell name.</param> /// <param name="style">WorkbookStyle</param> /// <param name="folder">The workbook folder.</param> /// <param name="storage">Workbook storage.</param> public void UpdateCellStyle(string name, string sheetName, string cellName, WorkbookStyle style, string folder, string storage = "") { // POST cells/{name}/worksheets/{sheetName}/cells/{cellName}/style?appSid={appSid}&storage={storage}&folder={folder} string apiUrl = string.Format(@"cells/{0}/worksheets/{1}/cells/{2}/style?storage={3}&folder={4}", name, sheetName, cellName, storage, folder); ServiceController.Post(apiUrl, AppSid, AppKey, JsonConvert.SerializeObject(style)); }
/// <summary> /// Update style for pivot table /// </summary> /// <param name="name">Document name.</param> /// <param name="sheetName">Worksheet name.</param> /// <param name="pivottableIndex">Pivot table index</param> /// <param name="style">WorkbookStyle object</param> /// <param name="folder">Document folder.</param> /// <param name="storage">The document storage.</param> public void UpdateStyleForPivotTable(string name, string sheetName, int pivotTableIndex, WorkbookStyle style, string folder, string storage = "") { //post cells/{name}/worksheets/{sheetName}/pivottables/{pivotTableIndex}/FormatAll?appSid={appSid}&storage={storage}&folder={folder} string apiUrl = string.Format(@"cells/{0}/worksheets/{1}/pivottables/{2}/FormatAll?storage={3}&folder={4}", name, sheetName, pivotTableIndex, storage, folder); JObject jObject = JObject.Parse(ServiceController.Post(apiUrl, AppSid, AppKey, JsonConvert.SerializeObject(style))); }