/** * @param nRowIndex * The 0-based index of the row, where to set the filter. Add an auto * filter on all columns in the current sheet. */ public void autoFilterAllColumns (@Nonnegative final int nRowIndex) { // Set auto filter on all columns // Use the specified row (param1, param2) // From first column to last column (param3, param4) m_aLastSheet.setAutoFilter (new CellRangeAddress (nRowIndex, nRowIndex, 0, m_nMaxCellIndex - 1)); }
/** * @param nRowIndex * The 0-based index of the row, where to set the filter. Add an auto filter on all * columns in the current sheet. */ public void autoFilterAllColumns (@Nonnegative final int nRowIndex) { // Set auto filter on all columns // Use the specified row (param1, param2) // From first column to last column (param3, param4) this.m_aLastSheet.setAutoFilter (new CellRangeAddress (nRowIndex, nRowIndex, 0, this.m_nMaxCellIndex - 1)); }
/** * Set auto-filter for the whole first row. Must be called after adding the first row with all heading cells. * * @return this for chaining. */ public ExportSheet setAutoFilter() { final int headingRow = 0; final ExportRow row = getRow(headingRow); final int lastCol = row.getMaxCol(); final CellRangeAddress range = new CellRangeAddress(headingRow, headingRow, 0, lastCol); getPoiSheet().setAutoFilter(range); return this; }
sheet.setAutoFilter(new CellRangeAddress(0, 1 + rows.size(),0, lastColumnIndex - 1)); return wb;
sheet.setAutoFilter(new CellRangeAddress(0, 1 + rows.size(), 0, 3)); return wb;
/** * @see org.projectforge.export.DOListExcelExporter#onBeforeExcelDownload(org.projectforge.export.MyExcelExporter) */ @Override public void onBeforeDownload() { final InvoicesExcelExport invoicesExport = new InvoicesExcelExport(); forecast = getForecast(); final LiquidityForecastCashFlow cashFlow = new LiquidityForecastCashFlow(forecast); cashFlow.addAsExcelSheet(this, getString("plugins.liquidityplanning.forecast.cashflow")); final ExportSheet sheet = addSheet(getString("filter.all")); addList(sheet, forecast.getEntries()); sheet.getPoiSheet().setAutoFilter(org.apache.poi.ss.util.CellRangeAddress.valueOf("A1:F1")); invoicesExport.addDebitorInvoicesSheet(this, getString("fibu.rechnungen"), forecast.getInvoices()); invoicesExport.addCreditorInvoicesSheet(this, getString("fibu.eingangsrechnungen"), forecast.getCreditorInvoices()); } };