org.apache.poi.ss.usermodel.Header Java Examples
The following examples show how to use
org.apache.poi.ss.usermodel.Header.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SpreadsheetSetHeader.java From openbd-core with GNU General Public License v3.0 | 6 votes |
public cfData execute( cfSession _session, List<cfData> parameters ) throws cfmRunTimeException { cfSpreadSheetData spreadsheet = null; String left, center, right; /* * Collect up the parameters */ spreadsheet = (cfSpreadSheetData)parameters.get(3); left = parameters.get(2).getString(); center = parameters.get(1).getString(); right = parameters.get(0).getString(); /* * Perform the insertion */ Sheet sheet = spreadsheet.getActiveSheet(); Header header = sheet.getHeader(); header.setCenter( center ); header.setLeft( left ); header.setRight( right ); return cfBooleanData.TRUE; }
Example #2
Source File: Util.java From Knowage-Server with GNU Affero General Public License v3.0 | 4 votes |
private static void copySheetSettings(Sheet newSheet, Sheet sheetToCopy) { newSheet.setAutobreaks(sheetToCopy.getAutobreaks()); newSheet.setDefaultColumnWidth(sheetToCopy.getDefaultColumnWidth()); newSheet.setDefaultRowHeight(sheetToCopy.getDefaultRowHeight()); newSheet.setDefaultRowHeightInPoints(sheetToCopy.getDefaultRowHeightInPoints()); newSheet.setDisplayGuts(sheetToCopy.getDisplayGuts()); newSheet.setFitToPage(sheetToCopy.getFitToPage()); newSheet.setForceFormulaRecalculation(sheetToCopy.getForceFormulaRecalculation()); PrintSetup sheetToCopyPrintSetup = sheetToCopy.getPrintSetup(); PrintSetup newSheetPrintSetup = newSheet.getPrintSetup(); newSheetPrintSetup.setPaperSize(sheetToCopyPrintSetup.getPaperSize()); newSheetPrintSetup.setScale(sheetToCopyPrintSetup.getScale()); newSheetPrintSetup.setPageStart(sheetToCopyPrintSetup.getPageStart()); newSheetPrintSetup.setFitWidth(sheetToCopyPrintSetup.getFitWidth()); newSheetPrintSetup.setFitHeight(sheetToCopyPrintSetup.getFitHeight()); newSheetPrintSetup.setLeftToRight(sheetToCopyPrintSetup.getLeftToRight()); newSheetPrintSetup.setLandscape(sheetToCopyPrintSetup.getLandscape()); newSheetPrintSetup.setValidSettings(sheetToCopyPrintSetup.getValidSettings()); newSheetPrintSetup.setNoColor(sheetToCopyPrintSetup.getNoColor()); newSheetPrintSetup.setDraft(sheetToCopyPrintSetup.getDraft()); newSheetPrintSetup.setNotes(sheetToCopyPrintSetup.getNotes()); newSheetPrintSetup.setNoOrientation(sheetToCopyPrintSetup.getNoOrientation()); newSheetPrintSetup.setUsePage(sheetToCopyPrintSetup.getUsePage()); newSheetPrintSetup.setHResolution(sheetToCopyPrintSetup.getHResolution()); newSheetPrintSetup.setVResolution(sheetToCopyPrintSetup.getVResolution()); newSheetPrintSetup.setHeaderMargin(sheetToCopyPrintSetup.getHeaderMargin()); newSheetPrintSetup.setFooterMargin(sheetToCopyPrintSetup.getFooterMargin()); newSheetPrintSetup.setCopies(sheetToCopyPrintSetup.getCopies()); Header sheetToCopyHeader = sheetToCopy.getHeader(); Header newSheetHeader = newSheet.getHeader(); newSheetHeader.setCenter(sheetToCopyHeader.getCenter()); newSheetHeader.setLeft(sheetToCopyHeader.getLeft()); newSheetHeader.setRight(sheetToCopyHeader.getRight()); Footer sheetToCopyFooter = sheetToCopy.getFooter(); Footer newSheetFooter = newSheet.getFooter(); newSheetFooter.setCenter(sheetToCopyFooter.getCenter()); newSheetFooter.setLeft(sheetToCopyFooter.getLeft()); newSheetFooter.setRight(sheetToCopyFooter.getRight()); newSheet.setHorizontallyCenter(sheetToCopy.getHorizontallyCenter()); newSheet.setMargin(Sheet.LeftMargin, sheetToCopy.getMargin(Sheet.LeftMargin)); newSheet.setMargin(Sheet.RightMargin, sheetToCopy.getMargin(Sheet.RightMargin)); newSheet.setMargin(Sheet.TopMargin, sheetToCopy.getMargin(Sheet.TopMargin)); newSheet.setMargin(Sheet.BottomMargin, sheetToCopy.getMargin(Sheet.BottomMargin)); newSheet.setPrintGridlines(sheetToCopy.isPrintGridlines()); newSheet.setRowSumsBelow(sheetToCopy.getRowSumsBelow()); newSheet.setRowSumsRight(sheetToCopy.getRowSumsRight()); newSheet.setVerticallyCenter(sheetToCopy.getVerticallyCenter()); newSheet.setDisplayFormulas(sheetToCopy.isDisplayFormulas()); newSheet.setDisplayGridlines(sheetToCopy.isDisplayGridlines()); newSheet.setDisplayRowColHeadings(sheetToCopy.isDisplayRowColHeadings()); newSheet.setDisplayZeros(sheetToCopy.isDisplayZeros()); newSheet.setPrintGridlines(sheetToCopy.isPrintGridlines()); newSheet.setRightToLeft(sheetToCopy.isRightToLeft()); newSheet.setZoom(1, 1); copyPrintTitle(newSheet, sheetToCopy); }
Example #3
Source File: StreamingSheet.java From data-prep with Apache License 2.0 | 4 votes |
/** * Not supported */ @Override public Header getHeader() { throw new UnsupportedOperationException(); }
Example #4
Source File: FilteredSheet.java From birt with Eclipse Public License 1.0 | 4 votes |
public Header getHeader() { return sheet.getHeader(); }
Example #5
Source File: StreamingSheet.java From excel-streaming-reader with Apache License 2.0 | 4 votes |
/** * Not supported */ @Override public Header getHeader() { throw new UnsupportedOperationException(); }