/// <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(ReturnEmtpyCells 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 = { '?', '&' }; TokenCollection tokens = new TokenCollection(targetUri.Query, 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 = (ReturnEmtpyCells)Enum.Parse(typeof(ReturnEmtpyCells), parameters[1]); break; } } } } return(this.Uri); }
/// <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 = { '?', '&'}; TokenCollection tokens = new TokenCollection(targetUri.Query, 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 = (ReturnEmtpyCells) Enum.Parse(typeof(ReturnEmtpyCells), 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(ReturnEmtpyCells returnEmpty) { CellQuery query = new CellQuery(this.CellFeedLink); query.ReturnEmpty = returnEmpty; return this.Service.Query(query) as CellFeed; }