org.apache.poi.hssf.usermodel.HSSFSheet.isColumnHidden()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(6.8k)|赞(0)|评价(0)|浏览(128)

本文整理了Java中org.apache.poi.hssf.usermodel.HSSFSheet.isColumnHidden()方法的一些代码示例,展示了HSSFSheet.isColumnHidden()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HSSFSheet.isColumnHidden()方法的具体详情如下:
包路径:org.apache.poi.hssf.usermodel.HSSFSheet
类名称:HSSFSheet
方法名:isColumnHidden

HSSFSheet.isColumnHidden介绍

[英]Get the hidden state for a given column.
[中]获取给定列的隐藏状态。

代码示例

代码示例来源:origin: com.haulmont.thirdparty/poi

/**
 * @deprecated (Sep 2008) use {@link #isColumnHidden(int)}
 */
public boolean isColumnHidden(short columnIndex) {
  return isColumnHidden(columnIndex & 0xFFFF);
}

代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev

/**
 * @deprecated (Sep 2008) use {@link #isColumnHidden(int)}
 */
public boolean isColumnHidden(short columnIndex) {
  return isColumnHidden(columnIndex & 0xFFFF);
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi

/**
 * Creates COLGROUP element with width specified for all columns. (Except
 * first if <tt>{@link #isOutputRowNumbers()}==true</tt>)
 */
protected void processColumnWidths( HSSFSheet sheet, int maxSheetColumns,
    Element table ) {
  // draw COLS after we know max column number
  Element columnGroup = htmlDocumentFacade.createTableColumnGroup();
  if ( isOutputRowNumbers() )
  {
    columnGroup.appendChild( htmlDocumentFacade.createTableColumn() );
  }
  for ( int c = 0; c < maxSheetColumns; c++ )
  {
    if ( !isOutputHiddenColumns() && sheet.isColumnHidden( c ) )
      continue;
    Element col = htmlDocumentFacade.createTableColumn();
    col.setAttribute( "width",
        String.valueOf( getColumnWidth( sheet, c ) ) );
    columnGroup.appendChild( col );
  }
  table.appendChild( columnGroup );
}

代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev

/**
 * Creates COLGROUP element with width specified for all columns. (Except
 * first if <tt>{@link #isOutputRowNumbers()}==true</tt>)
 */
protected void processColumnWidths( HSSFSheet sheet, int maxSheetColumns,
    Element table )
{
  // draw COLS after we know max column number
  Element columnGroup = htmlDocumentFacade.createTableColumnGroup();
  if ( isOutputRowNumbers() )
  {
    columnGroup.appendChild( htmlDocumentFacade.createTableColumn() );
  }
  for ( int c = 0; c < maxSheetColumns; c++ )
  {
    if ( !isOutputHiddenColumns() && sheet.isColumnHidden( c ) )
      continue;
    Element col = htmlDocumentFacade.createTableColumn();
    col.setAttribute( "width",
        String.valueOf( getColumnWidth( sheet, c ) ) );
    columnGroup.appendChild( col );
  }
  table.appendChild( columnGroup );
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi

protected void processColumnHeaders( HSSFSheet sheet, int maxSheetColumns,
    Element table ) {
  Element tableHeader = htmlDocumentFacade.createTableHeader();
  table.appendChild( tableHeader );
  Element tr = htmlDocumentFacade.createTableRow();
  if ( isOutputRowNumbers() ) {
    // empty row at left-top corner
    tr.appendChild( htmlDocumentFacade.createTableHeaderCell() );
  }
  for ( int c = 0; c < maxSheetColumns; c++ ) {
    if ( !isOutputHiddenColumns() && sheet.isColumnHidden( c ) )
      continue;
    Element th = htmlDocumentFacade.createTableHeaderCell();
    String text = getColumnName( c );
    th.appendChild( htmlDocumentFacade.createText( text ) );
    tr.appendChild( th );
  }
  tableHeader.appendChild( tr );
}

代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev

protected void processColumnHeaders( HSSFSheet sheet, int maxSheetColumns,
    Element table )
{
  Element tableHeader = foDocumentFacade.createTableHeader();
  Element row = foDocumentFacade.createTableRow();
  if ( isOutputRowNumbers() )
  {
    // empty cell at left-top corner
    final Element tableCellElement = foDocumentFacade.createTableCell();
    tableCellElement.appendChild( foDocumentFacade.createBlock() );
    row.appendChild( tableCellElement );
  }
  for ( int c = 0; c < maxSheetColumns; c++ )
  {
    if ( !isOutputHiddenColumns() && sheet.isColumnHidden( c ) )
      continue;
    Element cell = foDocumentFacade.createTableCell();
    Element block = foDocumentFacade.createBlock();
    block.setAttribute( "text-align", "center" );
    block.setAttribute( "font-weight", "bold" );
    String text = getColumnName( c );
    block.appendChild( foDocumentFacade.createText( text ) );
    cell.appendChild( block );
    row.appendChild( cell );
  }
  tableHeader.appendChild( row );
  table.appendChild( tableHeader );
}

代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev

if ( !isOutputHiddenColumns() && sheet.isColumnHidden( c ) )
  continue;

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi

if ( !isOutputHiddenColumns() && sheet.isColumnHidden( c ) )
  continue;

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi

protected void processColumnHeaders( HSSFSheet sheet, int maxSheetColumns,
    Element table )
{
  Element tableHeader = foDocumentFacade.createTableHeader();
  Element row = foDocumentFacade.createTableRow();
  if ( isOutputRowNumbers() )
  {
    // empty cell at left-top corner
    final Element tableCellElement = foDocumentFacade.createTableCell();
    tableCellElement.appendChild( foDocumentFacade.createBlock() );
    row.appendChild( tableCellElement );
  }
  for ( int c = 0; c < maxSheetColumns; c++ )
  {
    if ( !isOutputHiddenColumns() && sheet.isColumnHidden( c ) )
      continue;
    Element cell = foDocumentFacade.createTableCell();
    Element block = foDocumentFacade.createBlock();
    block.setAttribute( "text-align", "center" );
    block.setAttribute( "font-weight", "bold" );
    String text = getColumnName( c );
    block.appendChild( foDocumentFacade.createText( text ) );
    cell.appendChild( block );
    row.appendChild( cell );
  }
  tableHeader.appendChild( row );
  table.appendChild( tableHeader );
}

代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev

protected void processColumnHeaders( HSSFSheet sheet, int maxSheetColumns,
    Element table )
{
  Element tableHeader = htmlDocumentFacade.createTableHeader();
  table.appendChild( tableHeader );
  Element tr = htmlDocumentFacade.createTableRow();
  if ( isOutputRowNumbers() )
  {
    // empty row at left-top corner
    tr.appendChild( htmlDocumentFacade.createTableHeaderCell() );
  }
  for ( int c = 0; c < maxSheetColumns; c++ )
  {
    if ( !isOutputHiddenColumns() && sheet.isColumnHidden( c ) )
      continue;
    Element th = htmlDocumentFacade.createTableHeaderCell();
    String text = getColumnName( c );
    th.appendChild( htmlDocumentFacade.createText( text ) );
    tr.appendChild( th );
  }
  tableHeader.appendChild( tr );
}

代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev

for ( int colIx = 0; colIx < maxColIx; colIx++ )
  if ( !isOutputHiddenColumns() && sheet.isColumnHidden( colIx ) )
    continue;
          && sheet.isColumnHidden( nextColumnIndex ) )
        continue;

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi

for ( int colIx = 0; colIx < maxColIx; colIx++ )
  if ( !isOutputHiddenColumns() && sheet.isColumnHidden( colIx ) )
    continue;
          && sheet.isColumnHidden( nextColumnIndex ) )
        continue;

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi

for ( int colIx = 0; colIx < maxColIx; colIx++ )
  if ( !isOutputHiddenColumns() && sheet.isColumnHidden( colIx ) )
    continue;
          && sheet.isColumnHidden( nextColumnIndex ) )
        continue;

代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev

for ( int colIx = 0; colIx < maxColIx; colIx++ )
  if ( !isOutputHiddenColumns() && sheet.isColumnHidden( colIx ) )
    continue;
          && sheet.isColumnHidden( nextColumnIndex ) )
        continue;

相关文章

微信公众号

最新文章

更多

HSSFSheet类方法