/// <summary> /// Retrieves the cell-based metafeed of the cells within the worksheet. /// </summary> /// <param name="returnEmpty">indicates if a full sheet should be returned</param> /// <returns>The CellsFeed of the cells in this worksheet.</returns> public CellFeed QueryCellFeed(ReturnEmptyCells returnEmpty) { CellQuery query = new CellQuery(this.CellFeedLink); query.ReturnEmpty = returnEmpty; return(this.Service.Query(query) as CellFeed); }
/// <summary> /// Parses an incoming URI string and sets the instance variables /// of this object. /// </summary> /// <param name="targetUri">Takes an incoming Uri string and parses all the properties of it</param> /// <returns>Throws a query exception when it finds something wrong with the input, otherwise returns a baseuri.</returns> protected override Uri ParseUri(Uri targetUri) { base.ParseUri(targetUri); if (targetUri != null) { char[] delimiters = { '?', '&' }; string source = HttpUtility.UrlDecode(targetUri.Query); TokenCollection tokens = new TokenCollection(source, delimiters); foreach (String token in tokens) { if (token.Length > 0) { char[] otherDelimiters = { '=' }; String[] parameters = token.Split(otherDelimiters, 2); switch (parameters[0]) { case "min-row": this.MinimumRow = uint.Parse(parameters[1]); break; case "max-row": this.MaximumRow = uint.Parse(parameters[1]); break; case "min-col": this.MinimumColumn = uint.Parse(parameters[1]); break; case "max-col": this.MaximumColumn = uint.Parse(parameters[1]); break; case "range": this.Range = parameters[1]; break; case "return-empty": this.ReturnEmpty = (ReturnEmptyCells)Enum.Parse(typeof(ReturnEmptyCells), parameters[1]); break; } } } } return(this.Uri); }
/// <summary> /// Retrieves the cell-based metafeed of the cells within the worksheet. /// </summary> /// <param name="returnEmpty">indicates if a full sheet should be returned</param> /// <returns>The CellsFeed of the cells in this worksheet.</returns> public CellFeed QueryCellFeed(ReturnEmptyCells returnEmpty) { CellQuery query = new CellQuery(this.CellFeedLink); query.ReturnEmpty = returnEmpty; return this.Service.Query(query) as CellFeed; }
/// <summary> /// Parses an incoming URI string and sets the instance variables /// of this object. /// </summary> /// <param name="targetUri">Takes an incoming Uri string and parses all the properties of it</param> /// <returns>Throws a query exception when it finds something wrong with the input, otherwise returns a baseuri.</returns> protected override Uri ParseUri(Uri targetUri) { base.ParseUri(targetUri); if (targetUri != null) { char[] delimiters = { '?', '&'}; string source = HttpUtility.UrlDecode(targetUri.Query); TokenCollection tokens = new TokenCollection(source, delimiters); foreach (String token in tokens) { if (token.Length > 0) { char[] otherDelimiters = { '='}; String[] parameters = token.Split(otherDelimiters, 2); switch (parameters[0]) { case "min-row": this.MinimumRow = uint.Parse(parameters[1]); break; case "max-row": this.MaximumRow = uint.Parse(parameters[1]); break; case "min-col": this.MinimumColumn = uint.Parse(parameters[1]); break; case "max-col": this.MaximumColumn = uint.Parse(parameters[1]); break; case "range": this.Range = parameters[1]; break; case "return-empty": this.ReturnEmpty = (ReturnEmptyCells)Enum.Parse(typeof(ReturnEmptyCells), parameters[1]); break; } } } } return this.Uri; }