Class OdsSheet

java.lang.Object
org.spdx.spreadsheetstore.ods.OdsSheet
All Implemented Interfaces:
Iterable<org.apache.poi.ss.usermodel.Row>, org.apache.poi.ss.usermodel.Sheet

public class OdsSheet extends Object implements org.apache.poi.ss.usermodel.Sheet
Adapter for Apache POI Sheet over a SODS Sheet. Manages rows, columns, and sheet-level properties for an ODS document.
  • Constructor Details

    • OdsSheet

      public OdsSheet(OdsWorkbook workbook, com.github.miachm.sods.Sheet sodsSheet)
      Creates an ODS sheet wrapper around a SODS sheet.
      Parameters:
      workbook - Parent ODS workbook adapter.
      sodsSheet - Underlying SODS sheet instance.
  • Method Details

    • createRow

      public org.apache.poi.ss.usermodel.Row createRow(int rownum)
      Specified by:
      createRow in interface org.apache.poi.ss.usermodel.Sheet
    • getRow

      public org.apache.poi.ss.usermodel.Row getRow(int rownum)
      Specified by:
      getRow in interface org.apache.poi.ss.usermodel.Sheet
    • removeRow

      public void removeRow(org.apache.poi.ss.usermodel.Row row)
      Specified by:
      removeRow in interface org.apache.poi.ss.usermodel.Sheet
    • getFirstRowNum

      public int getFirstRowNum()
      Specified by:
      getFirstRowNum in interface org.apache.poi.ss.usermodel.Sheet
    • getLastRowNum

      public int getLastRowNum()
      Specified by:
      getLastRowNum in interface org.apache.poi.ss.usermodel.Sheet
    • setColumnWidth

      public void setColumnWidth(int columnIndex, int width)
      Specified by:
      setColumnWidth in interface org.apache.poi.ss.usermodel.Sheet
    • getColumnWidth

      public int getColumnWidth(int columnIndex)
      Specified by:
      getColumnWidth in interface org.apache.poi.ss.usermodel.Sheet
    • autoSizeColumn

      public void autoSizeColumn(int columnIndex)
      Specified by:
      autoSizeColumn in interface org.apache.poi.ss.usermodel.Sheet
    • getWorkbook

      public org.apache.poi.ss.usermodel.Workbook getWorkbook()
      Specified by:
      getWorkbook in interface org.apache.poi.ss.usermodel.Sheet
    • getSheetName

      public String getSheetName()
      Specified by:
      getSheetName in interface org.apache.poi.ss.usermodel.Sheet
    • getMargin

      public double getMargin(org.apache.poi.ss.usermodel.PageMargin margin)
      Specified by:
      getMargin in interface org.apache.poi.ss.usermodel.Sheet
    • setMargin

      public void setMargin(org.apache.poi.ss.usermodel.PageMargin margin, double size)
      Specified by:
      setMargin in interface org.apache.poi.ss.usermodel.Sheet
    • isPrintGridlines

      public boolean isPrintGridlines()
      Specified by:
      isPrintGridlines in interface org.apache.poi.ss.usermodel.Sheet
    • setPrintGridlines

      public void setPrintGridlines(boolean show)
      Specified by:
      setPrintGridlines in interface org.apache.poi.ss.usermodel.Sheet
    • isPrintRowAndColumnHeadings

      public boolean isPrintRowAndColumnHeadings()
      Specified by:
      isPrintRowAndColumnHeadings in interface org.apache.poi.ss.usermodel.Sheet
    • setPrintRowAndColumnHeadings

      public void setPrintRowAndColumnHeadings(boolean show)
      Specified by:
      setPrintRowAndColumnHeadings in interface org.apache.poi.ss.usermodel.Sheet
    • setActiveCell

      public void setActiveCell(org.apache.poi.ss.util.CellAddress address)
      Specified by:
      setActiveCell in interface org.apache.poi.ss.usermodel.Sheet
    • removeMergedRegion

      public void removeMergedRegion(int index)
      Specified by:
      removeMergedRegion in interface org.apache.poi.ss.usermodel.Sheet
    • removeMergedRegions

      public void removeMergedRegions(Collection<Integer> indices)
      Specified by:
      removeMergedRegions in interface org.apache.poi.ss.usermodel.Sheet
    • getNumMergedRegions

      public int getNumMergedRegions()
      Specified by:
      getNumMergedRegions in interface org.apache.poi.ss.usermodel.Sheet
    • getMergedRegion

      public org.apache.poi.ss.util.CellRangeAddress getMergedRegion(int index)
      Specified by:
      getMergedRegion in interface org.apache.poi.ss.usermodel.Sheet
    • getMergedRegions

      public List<org.apache.poi.ss.util.CellRangeAddress> getMergedRegions()
      Specified by:
      getMergedRegions in interface org.apache.poi.ss.usermodel.Sheet
    • rowIterator

      public Iterator<org.apache.poi.ss.usermodel.Row> rowIterator()
      Specified by:
      rowIterator in interface org.apache.poi.ss.usermodel.Sheet
    • iterator

      public Iterator<org.apache.poi.ss.usermodel.Row> iterator()
      Specified by:
      iterator in interface Iterable<org.apache.poi.ss.usermodel.Row>
      Specified by:
      iterator in interface org.apache.poi.ss.usermodel.Sheet
    • setForceFormulaRecalculation

      public void setForceFormulaRecalculation(boolean value)
      Specified by:
      setForceFormulaRecalculation in interface org.apache.poi.ss.usermodel.Sheet
    • getForceFormulaRecalculation

      public boolean getForceFormulaRecalculation()
      Specified by:
      getForceFormulaRecalculation in interface org.apache.poi.ss.usermodel.Sheet
    • setAutobreaks

      public void setAutobreaks(boolean value)
      Specified by:
      setAutobreaks in interface org.apache.poi.ss.usermodel.Sheet
    • getAutobreaks

      public boolean getAutobreaks()
      Specified by:
      getAutobreaks in interface org.apache.poi.ss.usermodel.Sheet
    • setDisplayGuts

      public void setDisplayGuts(boolean value)
      Specified by:
      setDisplayGuts in interface org.apache.poi.ss.usermodel.Sheet
    • getDisplayGuts

      public boolean getDisplayGuts()
      Specified by:
      getDisplayGuts in interface org.apache.poi.ss.usermodel.Sheet
    • setDisplayRowColHeadings

      public void setDisplayRowColHeadings(boolean value)
      Specified by:
      setDisplayRowColHeadings in interface org.apache.poi.ss.usermodel.Sheet
    • setDisplayFormulas

      public void setDisplayFormulas(boolean value)
      Specified by:
      setDisplayFormulas in interface org.apache.poi.ss.usermodel.Sheet
    • setDisplayGridlines

      public void setDisplayGridlines(boolean value)
      Specified by:
      setDisplayGridlines in interface org.apache.poi.ss.usermodel.Sheet
    • isDisplayGridlines

      public boolean isDisplayGridlines()
      Specified by:
      isDisplayGridlines in interface org.apache.poi.ss.usermodel.Sheet
    • setRowSumsBelow

      public void setRowSumsBelow(boolean value)
      Specified by:
      setRowSumsBelow in interface org.apache.poi.ss.usermodel.Sheet
    • getRowSumsBelow

      public boolean getRowSumsBelow()
      Specified by:
      getRowSumsBelow in interface org.apache.poi.ss.usermodel.Sheet
    • setRowSumsRight

      public void setRowSumsRight(boolean value)
      Specified by:
      setRowSumsRight in interface org.apache.poi.ss.usermodel.Sheet
    • getRowSumsRight

      public boolean getRowSumsRight()
      Specified by:
      getRowSumsRight in interface org.apache.poi.ss.usermodel.Sheet
    • getPhysicalNumberOfRows

      public int getPhysicalNumberOfRows()
      Specified by:
      getPhysicalNumberOfRows in interface org.apache.poi.ss.usermodel.Sheet
    • addMergedRegion

      public int addMergedRegion(org.apache.poi.ss.util.CellRangeAddress region)
      Specified by:
      addMergedRegion in interface org.apache.poi.ss.usermodel.Sheet
    • addMergedRegionUnsafe

      public int addMergedRegionUnsafe(org.apache.poi.ss.util.CellRangeAddress region)
      Specified by:
      addMergedRegionUnsafe in interface org.apache.poi.ss.usermodel.Sheet
    • getActiveCell

      public org.apache.poi.ss.util.CellAddress getActiveCell()
      Specified by:
      getActiveCell in interface org.apache.poi.ss.usermodel.Sheet
    • getHyperlinkList

      public List<? extends org.apache.poi.ss.usermodel.Hyperlink> getHyperlinkList()
      Specified by:
      getHyperlinkList in interface org.apache.poi.ss.usermodel.Sheet
    • getHyperlink

      public org.apache.poi.ss.usermodel.Hyperlink getHyperlink(org.apache.poi.ss.util.CellAddress address)
      Specified by:
      getHyperlink in interface org.apache.poi.ss.usermodel.Sheet
    • getHyperlink

      public org.apache.poi.ss.usermodel.Hyperlink getHyperlink(int row, int column)
      Specified by:
      getHyperlink in interface org.apache.poi.ss.usermodel.Sheet
    • getColumnOutlineLevel

      public int getColumnOutlineLevel(int columnIndex)
      Specified by:
      getColumnOutlineLevel in interface org.apache.poi.ss.usermodel.Sheet
    • setRepeatingColumns

      public void setRepeatingColumns(org.apache.poi.ss.util.CellRangeAddress repeatingColumnsToIndex)
      Specified by:
      setRepeatingColumns in interface org.apache.poi.ss.usermodel.Sheet
    • setRepeatingRows

      public void setRepeatingRows(org.apache.poi.ss.util.CellRangeAddress repeatingRowsToIndex)
      Specified by:
      setRepeatingRows in interface org.apache.poi.ss.usermodel.Sheet
    • getRepeatingColumns

      public org.apache.poi.ss.util.CellRangeAddress getRepeatingColumns()
      Specified by:
      getRepeatingColumns in interface org.apache.poi.ss.usermodel.Sheet
    • getRepeatingRows

      public org.apache.poi.ss.util.CellRangeAddress getRepeatingRows()
      Specified by:
      getRepeatingRows in interface org.apache.poi.ss.usermodel.Sheet
    • getSheetConditionalFormatting

      public org.apache.poi.ss.usermodel.SheetConditionalFormatting getSheetConditionalFormatting()
      Specified by:
      getSheetConditionalFormatting in interface org.apache.poi.ss.usermodel.Sheet
    • setAutoFilter

      public org.apache.poi.ss.usermodel.AutoFilter setAutoFilter(org.apache.poi.ss.util.CellRangeAddress range)
      Specified by:
      setAutoFilter in interface org.apache.poi.ss.usermodel.Sheet
    • addValidationData

      public void addValidationData(org.apache.poi.ss.usermodel.DataValidation dataValidation)
      Data validation is not currently supported by the underlying SODS 1.10 library. This method acts as a no-op to maintain POI interface compatibility.
      Specified by:
      addValidationData in interface org.apache.poi.ss.usermodel.Sheet
    • getDataValidations

      public List<? extends org.apache.poi.ss.usermodel.DataValidation> getDataValidations()
      Specified by:
      getDataValidations in interface org.apache.poi.ss.usermodel.Sheet
    • getDataValidationHelper

      public org.apache.poi.ss.usermodel.DataValidationHelper getDataValidationHelper()
      Data validation helpers are not currently supported by the underlying SODS 1.10 library. Returns null to maintain POI interface compatibility.
      Specified by:
      getDataValidationHelper in interface org.apache.poi.ss.usermodel.Sheet
    • removeArrayFormula

      public org.apache.poi.ss.usermodel.CellRange<? extends org.apache.poi.ss.usermodel.Cell> removeArrayFormula(org.apache.poi.ss.usermodel.Cell cell)
      Specified by:
      removeArrayFormula in interface org.apache.poi.ss.usermodel.Sheet
    • setArrayFormula

      public org.apache.poi.ss.usermodel.CellRange<? extends org.apache.poi.ss.usermodel.Cell> setArrayFormula(String formula, org.apache.poi.ss.util.CellRangeAddress range)
      Specified by:
      setArrayFormula in interface org.apache.poi.ss.usermodel.Sheet
    • isSelected

      public boolean isSelected()
      Specified by:
      isSelected in interface org.apache.poi.ss.usermodel.Sheet
    • createDrawingPatriarch

      public org.apache.poi.ss.usermodel.Drawing<?> createDrawingPatriarch()
      Specified by:
      createDrawingPatriarch in interface org.apache.poi.ss.usermodel.Sheet
    • getDrawingPatriarch

      public org.apache.poi.ss.usermodel.Drawing<?> getDrawingPatriarch()
      Specified by:
      getDrawingPatriarch in interface org.apache.poi.ss.usermodel.Sheet
    • getCellComments

      public Map<org.apache.poi.ss.util.CellAddress,? extends org.apache.poi.ss.usermodel.Comment> getCellComments()
      Specified by:
      getCellComments in interface org.apache.poi.ss.usermodel.Sheet
    • getCellComment

      public org.apache.poi.ss.usermodel.Comment getCellComment(org.apache.poi.ss.util.CellAddress address)
      Specified by:
      getCellComment in interface org.apache.poi.ss.usermodel.Sheet
    • autoSizeColumn

      public void autoSizeColumn(int columnIndex, boolean useMergedCells)
      Specified by:
      autoSizeColumn in interface org.apache.poi.ss.usermodel.Sheet
    • setDefaultColumnStyle

      public void setDefaultColumnStyle(int column, org.apache.poi.ss.usermodel.CellStyle style)
      Specified by:
      setDefaultColumnStyle in interface org.apache.poi.ss.usermodel.Sheet
    • setRowGroupCollapsed

      public void setRowGroupCollapsed(int row, boolean collapse)
      Specified by:
      setRowGroupCollapsed in interface org.apache.poi.ss.usermodel.Sheet
    • groupRow

      public void groupRow(int startRow, int endRow)
      Specified by:
      groupRow in interface org.apache.poi.ss.usermodel.Sheet
    • ungroupRow

      public void ungroupRow(int startRow, int endRow)
      Specified by:
      ungroupRow in interface org.apache.poi.ss.usermodel.Sheet
    • groupColumn

      public void groupColumn(int startColumn, int endColumn)
      Specified by:
      groupColumn in interface org.apache.poi.ss.usermodel.Sheet
    • ungroupColumn

      public void ungroupColumn(int startColumn, int endColumn)
      Specified by:
      ungroupColumn in interface org.apache.poi.ss.usermodel.Sheet
    • setColumnGroupCollapsed

      public void setColumnGroupCollapsed(int columnNumber, boolean collapsed)
      Specified by:
      setColumnGroupCollapsed in interface org.apache.poi.ss.usermodel.Sheet
    • setRowBreak

      public void setRowBreak(int row)
      Specified by:
      setRowBreak in interface org.apache.poi.ss.usermodel.Sheet
    • removeRowBreak

      public void removeRowBreak(int row)
      Specified by:
      removeRowBreak in interface org.apache.poi.ss.usermodel.Sheet
    • isRowBroken

      public boolean isRowBroken(int row)
      Specified by:
      isRowBroken in interface org.apache.poi.ss.usermodel.Sheet
    • getRowBreaks

      public int[] getRowBreaks()
      Specified by:
      getRowBreaks in interface org.apache.poi.ss.usermodel.Sheet
    • setColumnBreak

      public void setColumnBreak(int column)
      Specified by:
      setColumnBreak in interface org.apache.poi.ss.usermodel.Sheet
    • removeColumnBreak

      public void removeColumnBreak(int column)
      Specified by:
      removeColumnBreak in interface org.apache.poi.ss.usermodel.Sheet
    • isColumnBroken

      public boolean isColumnBroken(int column)
      Specified by:
      isColumnBroken in interface org.apache.poi.ss.usermodel.Sheet
    • getColumnBreaks

      public int[] getColumnBreaks()
      Specified by:
      getColumnBreaks in interface org.apache.poi.ss.usermodel.Sheet
    • isDisplayRowColHeadings

      public boolean isDisplayRowColHeadings()
      Specified by:
      isDisplayRowColHeadings in interface org.apache.poi.ss.usermodel.Sheet
    • isDisplayFormulas

      public boolean isDisplayFormulas()
      Specified by:
      isDisplayFormulas in interface org.apache.poi.ss.usermodel.Sheet
    • getPaneInformation

      public org.apache.poi.ss.util.PaneInformation getPaneInformation()
      Specified by:
      getPaneInformation in interface org.apache.poi.ss.usermodel.Sheet
    • createFreezePane

      public void createFreezePane(int colSplit, int rowSplit, int leftmostColumn, int topRow)
      Specified by:
      createFreezePane in interface org.apache.poi.ss.usermodel.Sheet
    • createFreezePane

      public void createFreezePane(int colSplit, int rowSplit)
      Specified by:
      createFreezePane in interface org.apache.poi.ss.usermodel.Sheet
    • createSplitPane

      public void createSplitPane(int xSplit, int ySplit, int leftmostColumn, int topRow, org.apache.poi.ss.usermodel.PaneType activePane)
      Specified by:
      createSplitPane in interface org.apache.poi.ss.usermodel.Sheet
    • createSplitPane

      public void createSplitPane(int xSplit, int ySplit, int leftmostColumn, int topRow, int activePane)
      Specified by:
      createSplitPane in interface org.apache.poi.ss.usermodel.Sheet
    • shiftColumns

      public void shiftColumns(int startColumn, int endColumn, int n)
      Specified by:
      shiftColumns in interface org.apache.poi.ss.usermodel.Sheet
    • shiftRows

      public void shiftRows(int startRow, int endRow, int n, boolean copyRowHeight, boolean resetOriginalRowHeight)
      Specified by:
      shiftRows in interface org.apache.poi.ss.usermodel.Sheet
    • shiftRows

      public void shiftRows(int startRow, int endRow, int n)
      Specified by:
      shiftRows in interface org.apache.poi.ss.usermodel.Sheet
    • showInPane

      public void showInPane(int topRow, int leftmostColumn)
      Specified by:
      showInPane in interface org.apache.poi.ss.usermodel.Sheet
    • getLeftCol

      public short getLeftCol()
      Specified by:
      getLeftCol in interface org.apache.poi.ss.usermodel.Sheet
    • getTopRow

      public short getTopRow()
      Specified by:
      getTopRow in interface org.apache.poi.ss.usermodel.Sheet
    • setZoom

      public void setZoom(int scale)
      Specified by:
      setZoom in interface org.apache.poi.ss.usermodel.Sheet
    • getScenarioProtect

      public boolean getScenarioProtect()
      Specified by:
      getScenarioProtect in interface org.apache.poi.ss.usermodel.Sheet
    • protectSheet

      public void protectSheet(String password)
      Specified by:
      protectSheet in interface org.apache.poi.ss.usermodel.Sheet
    • getProtect

      public boolean getProtect()
      Specified by:
      getProtect in interface org.apache.poi.ss.usermodel.Sheet
    • getMargin

      public double getMargin(short margin)
      Specified by:
      getMargin in interface org.apache.poi.ss.usermodel.Sheet
    • setMargin

      public void setMargin(short margin, double size)
      Specified by:
      setMargin in interface org.apache.poi.ss.usermodel.Sheet
    • setSelected

      public void setSelected(boolean sel)
      Specified by:
      setSelected in interface org.apache.poi.ss.usermodel.Sheet
    • getHeader

      public org.apache.poi.ss.usermodel.Header getHeader()
      Specified by:
      getHeader in interface org.apache.poi.ss.usermodel.Sheet
    • getFooter

      public org.apache.poi.ss.usermodel.Footer getFooter()
      Specified by:
      getFooter in interface org.apache.poi.ss.usermodel.Sheet
    • getPrintSetup

      public org.apache.poi.ss.usermodel.PrintSetup getPrintSetup()
      Specified by:
      getPrintSetup in interface org.apache.poi.ss.usermodel.Sheet
    • getFitToPage

      public boolean getFitToPage()
      Specified by:
      getFitToPage in interface org.apache.poi.ss.usermodel.Sheet
    • setFitToPage

      public void setFitToPage(boolean value)
      Specified by:
      setFitToPage in interface org.apache.poi.ss.usermodel.Sheet
    • isDisplayZeros

      public boolean isDisplayZeros()
      Specified by:
      isDisplayZeros in interface org.apache.poi.ss.usermodel.Sheet
    • setDisplayZeros

      public void setDisplayZeros(boolean value)
      Specified by:
      setDisplayZeros in interface org.apache.poi.ss.usermodel.Sheet
    • getHorizontallyCenter

      public boolean getHorizontallyCenter()
      Specified by:
      getHorizontallyCenter in interface org.apache.poi.ss.usermodel.Sheet
    • setHorizontallyCenter

      public void setHorizontallyCenter(boolean value)
      Specified by:
      setHorizontallyCenter in interface org.apache.poi.ss.usermodel.Sheet
    • getVerticallyCenter

      public boolean getVerticallyCenter()
      Specified by:
      getVerticallyCenter in interface org.apache.poi.ss.usermodel.Sheet
    • setVerticallyCenter

      public void setVerticallyCenter(boolean value)
      Specified by:
      setVerticallyCenter in interface org.apache.poi.ss.usermodel.Sheet
    • validateMergedRegions

      public void validateMergedRegions()
      Specified by:
      validateMergedRegions in interface org.apache.poi.ss.usermodel.Sheet
    • getColumnStyle

      public org.apache.poi.ss.usermodel.CellStyle getColumnStyle(int column)
      Specified by:
      getColumnStyle in interface org.apache.poi.ss.usermodel.Sheet
    • getDefaultRowHeight

      public short getDefaultRowHeight()
      Specified by:
      getDefaultRowHeight in interface org.apache.poi.ss.usermodel.Sheet
    • setDefaultRowHeight

      public void setDefaultRowHeight(short height)
      Specified by:
      setDefaultRowHeight in interface org.apache.poi.ss.usermodel.Sheet
    • getDefaultRowHeightInPoints

      public float getDefaultRowHeightInPoints()
      Specified by:
      getDefaultRowHeightInPoints in interface org.apache.poi.ss.usermodel.Sheet
    • setDefaultRowHeightInPoints

      public void setDefaultRowHeightInPoints(float height)
      Specified by:
      setDefaultRowHeightInPoints in interface org.apache.poi.ss.usermodel.Sheet
    • getDefaultColumnWidth

      public int getDefaultColumnWidth()
      Specified by:
      getDefaultColumnWidth in interface org.apache.poi.ss.usermodel.Sheet
    • setDefaultColumnWidth

      public void setDefaultColumnWidth(int width)
      Specified by:
      setDefaultColumnWidth in interface org.apache.poi.ss.usermodel.Sheet
    • getColumnWidthInPixels

      public float getColumnWidthInPixels(int columnIndex)
      Specified by:
      getColumnWidthInPixels in interface org.apache.poi.ss.usermodel.Sheet
    • isRightToLeft

      public boolean isRightToLeft()
      Specified by:
      isRightToLeft in interface org.apache.poi.ss.usermodel.Sheet
    • setRightToLeft

      public void setRightToLeft(boolean value)
      Specified by:
      setRightToLeft in interface org.apache.poi.ss.usermodel.Sheet
    • isColumnHidden

      public boolean isColumnHidden(int columnIndex)
      Specified by:
      isColumnHidden in interface org.apache.poi.ss.usermodel.Sheet
    • setColumnHidden

      public void setColumnHidden(int columnIndex, boolean hidden)
      Specified by:
      setColumnHidden in interface org.apache.poi.ss.usermodel.Sheet