/** Constructs a cells feed from an existing feed. */ public CellFeed(BaseFeed sourceFeed) { super(CellEntry.class, sourceFeed); getCategories().add(CellEntry.CATEGORY); }
/** * Gets the total number of rows in the spreadsheet. * * This refers to the hard bound on rows. It is possible that your * spreadsheet has many, many empty rows, all of which are counted in * this count. * * Column positions 1 to getRowCount() are valid. */ public int getRowCount() { return getExtension(RowCount.class).getCount(); }
/** * Declare the extensions of the feeds for the Google Spreadsheets service. */ private void declareExtensions() { new CellFeed().declareExtensions(extProfile); new ListFeed().declareExtensions(extProfile); new RecordFeed().declareExtensions(extProfile); new SpreadsheetFeed().declareExtensions(extProfile); new TableFeed().declareExtensions(extProfile); new WorksheetFeed().declareExtensions(extProfile); }
private void writeTemporaryRow(final int rowIndex, final int lastColumnIndex) throws Exception { final StringBuilder uri = new StringBuilder(this.worksheetEntry.getCellFeedUrl().toString()); uri.append("?min-row=" + Integer.toString(rowIndex)); uri.append("&max-row=" + Integer.toString(rowIndex)); uri.append("&min-col=1&max-col=" + Integer.toString(lastColumnIndex)); uri.append("&return-empty=true"); final URL cellFeedUrl = new URI(uri.toString()).toURL(); final CellFeed cellFeed = this.model.getWorksheetCellFeed(cellFeedUrl); for (final CellEntry cell : cellFeed.getEntries()) { cell.changeInputValueLocal(GSConstants.DEFAULT_COLUMN_VALUE); cell.update(); } }
public void writeHeaderCell(final int columnIndex, final String columnName) throws Exception { final CellFeed cellFeed = this.getHeaderCellFeed(); final CellEntry cellEntry = new CellEntry(GSConstants.HEADER_ROW_INDEX, columnIndex, columnName); cellFeed.insert(cellEntry); }
/** * Declare the extensions of the feeds for the Google Spreadsheets service. */ private void declareExtensions() { new CellFeed().declareExtensions(extProfile); new ListFeed().declareExtensions(extProfile); new RecordFeed().declareExtensions(extProfile); new SpreadsheetFeed().declareExtensions(extProfile); new TableFeed().declareExtensions(extProfile); new WorksheetFeed().declareExtensions(extProfile); }
if (headerRow != null) for (final CellEntry headerCell : headerRow.getEntries())
/** Constructs a blank cells feed. */ public CellFeed() { super(CellEntry.class); getCategories().add(CellEntry.CATEGORY); }
/** * Gets the total number of columns. * * This refers to the hard bound on columns. It is possible that your * spreadsheet has many empty columns, all of which are counted in * this count. * * Column positions 1 to getColCount() are valid. */ public int getColCount() { return getExtension(ColCount.class).getCount(); } }
public GSpreadResultSet retrieveData() throws Exception { URL worksheetUrl = this.getConfig().generateWorksheetFeedURL(); WorksheetFeed feedw = this.getConfig().getFeed(worksheetUrl, WorksheetFeed.class); WorksheetEntry worksheetEntry = feedw.getEntries().get(this.getWorksheetNumber() - 1); CellFeed feedc = this.getConfig().getFeed(worksheetEntry.getCellFeedUrl(), CellFeed.class); List<CellEntry> entries = feedc.getEntries(); GSpreadResultSet grs = new GSpreadResultSet(); /* store the data */ for (CellEntry entry : entries) { grs.addCell(this.getPosStringFromId(entry.getId()), entry.getTextContent().getContent().getPlainText()); } return grs; }
/** Constructs a blank cells feed. */ public CellFeed() { super(CellEntry.class); getCategories().add(CellEntry.CATEGORY); }
/** * Gets the total number of rows in the spreadsheet. * * This refers to the hard bound on rows. It is possible that your * spreadsheet has many, many empty rows, all of which are counted in * this count. * * Column positions 1 to getRowCount() are valid. */ public int getRowCount() { return getExtension(RowCount.class).getCount(); }
/** Constructs a cells feed from an existing feed. */ public CellFeed(BaseFeed sourceFeed) { super(CellEntry.class, sourceFeed); getCategories().add(CellEntry.CATEGORY); }
/** * Gets the total number of columns. * * This refers to the hard bound on columns. It is possible that your * spreadsheet has many empty columns, all of which are counted in * this count. * * Column positions 1 to getColCount() are valid. */ public int getColCount() { return getExtension(ColCount.class).getCount(); } }