List of usage examples for org.apache.poi.ss.util CellAddress A1
CellAddress A1
To view the source code for org.apache.poi.ss.util CellAddress A1.
Click Source Link
From source file:org.keyboardplaying.xtt.xlsx.XlsxNormalizer.java
License:Apache License
private void normalizeSheet(XSSFSheet sheet, String activeRange) { sheet.setZoom(ZOOM_100);// w w w .j av a2 s .c o m sheet.setDisplayGridlines(false); sheet.setSelected(false); PaneInformation pane = sheet.getPaneInformation(); if (pane == null) { /* Reset cell */ sheet.setActiveCell(new CellAddress(activeRange)); /* Reset view */ sheet.getCTWorksheet().getSheetViews().getSheetViewArray(0) .setTopLeftCell(CellAddress.A1.formatAsString()); } else { /* Reset cell */ sheet.createFreezePane(0, 0); // Remove panes sheet.setActiveCell(new CellAddress(activeRange)); sheet.createFreezePane(pane.getVerticalSplitLeftColumn(), pane.getHorizontalSplitTopRow()); // Reset panes /* Reset view */ sheet.showInPane(pane.getHorizontalSplitPosition(), pane.getVerticalSplitPosition()); } }