public List <LinkResponse> GetColumnsList(int offset, int count) { //check whether file is set or not if (FileName == "") { throw new Exception("No file name specified"); } //build URI string strURI = Saaspose.Common.Product.BaseProductUri + "/cells/" + FileName; strURI += "/worksheets/" + WorkSheetName + "/cells/columns?offset=" + offset + "&count=" + count; //sign URI string signedURI = Utils.Sign(strURI); StreamReader reader = new StreamReader(Utils.ProcessCommand(signedURI, "GET")); //further process JSON response string strJSON = reader.ReadToEnd(); //Parse the json string to JObject JObject parsedJSON = JObject.Parse(strJSON); //Deserializes the JSON to a object. WorksheetResponse worksheetResponse = JsonConvert.DeserializeObject <WorksheetResponse>(parsedJSON.ToString()); return(worksheetResponse.Columns.ColumnsList); }
/// <summary> /// /// </summary> /// <returns></returns> public bool HideWorksheet() { //check whether file is set or not if (FileName == "") { throw new Exception("No file name specified"); } //build URI string strURI = Saaspose.Common.Product.BaseProductUri + "/cells/" + FileName; strURI += "/worksheets/" + WorkSheetName + "/visible?isVisible=false"; //sign URI string signedURI = Utils.Sign(strURI); StreamReader reader = new StreamReader(Utils.ProcessCommand(signedURI, "PUT")); //further process JSON response string strJSON = reader.ReadToEnd(); //Parse the json string to JObject JObject parsedJSON = JObject.Parse(strJSON); //Deserializes the JSON to a object. WorksheetResponse worksheetResponse = JsonConvert.DeserializeObject <WorksheetResponse>(parsedJSON.ToString()); if (worksheetResponse.Status == "OK") { return(true); } else { return(false); } }