/// <summary> /// Gets cells in the currently selected worksheet. /// </summary> /// <param name="queryType">Can be all for requesting all cells, DateRow for only request cells in the date row or PlantsColumn for only request cells in the column with plants names.</param> /// <returns>Returns <typeparamref name="Google.GData.Spreadsheets.CellEntry" /> array.</returns> /// <exception cref="System.NullReferenceException">currentWorksheet is null or helper is null.</exception> /// <exception cref="System.ArgumentNullException">An unspecified <paramref name="queryType"/> was given.</exception public CellEntry[] GetCells(CellQueryType queryType = CellQueryType.All) { if (this.currentWorksheet == null || this.helper == null) { throw new NullReferenceException(); } CellQuery query = null; if ((queryType & CellQueryType.All) == CellQueryType.All) { query = new CellQuery(this.currentWorksheet.CellFeedLink); query.ReturnEmpty = ReturnEmptyCells.yes; } else if ((queryType & CellQueryType.DateRow) == CellQueryType.DateRow) { query = new CellQuery(this.currentWorksheet.CellFeedLink); query.ReturnEmpty = ReturnEmptyCells.yes; // Get only one row query.MinimumRow = query.MaximumRow = 2; } else if ((queryType & CellQueryType.PlantsColumn) == CellQueryType.PlantsColumn) { query = new CellQuery(this.currentWorksheet.CellFeedLink); query.ReturnEmpty = ReturnEmptyCells.yes; // Get only one column query.MinimumColumn = query.MaximumColumn = 1; } return(this.helper.GetCells(query)); }
/// <summary> /// Gets cells in the currently selected worksheet. /// </summary> /// <param name="queryType">Can be all for requesting all cells, DateRow for only request cells in the date row or PlantsColumn for only request cells in the column with plants names.</param> /// <returns>Returns <typeparamref name="Google.GData.Spreadsheets.CellEntry" /> array.</returns> /// <exception cref="System.NullReferenceException">currentWorksheet is null or helper is null.</exception> /// <exception cref="System.ArgumentNullException">An unspecified <paramref name="queryType"/> was given.</exception public CellEntry[] GetCells(CellQueryType queryType = CellQueryType.All) { if (this.currentWorksheet == null || this.helper == null) { throw new NullReferenceException(); } CellQuery query = null; if ((queryType & CellQueryType.All) == CellQueryType.All) { query = new CellQuery(this.currentWorksheet.CellFeedLink); query.ReturnEmpty = ReturnEmptyCells.yes; } else if ((queryType & CellQueryType.DateRow) == CellQueryType.DateRow) { query = new CellQuery(this.currentWorksheet.CellFeedLink); query.ReturnEmpty = ReturnEmptyCells.yes; // Get only one row query.MinimumRow = query.MaximumRow = 2; } else if ((queryType & CellQueryType.PlantsColumn) == CellQueryType.PlantsColumn) { query = new CellQuery(this.currentWorksheet.CellFeedLink); query.ReturnEmpty = ReturnEmptyCells.yes; // Get only one column query.MinimumColumn = query.MaximumColumn = 1; } return this.helper.GetCells(query); }