public final class ReportsUtil extends Object
| 修飾子とタイプ | フィールドと説明 | 
|---|---|
| static String | VALUE_SHEET_NAMESシステム変数:シート名 | 
| static String | VALUE_SHEET_VALUESシステム変数:シート値 | 
| 修飾子とタイプ | メソッドと説明 | 
|---|---|
| static void | copyPrintSetup(org.apache.poi.ss.usermodel.Workbook workbook,
              int fromIdx,
              org.apache.poi.ss.usermodel.Sheet toSheet)fromIdxのシートからtoIdxシートへの印刷設定のコピーを行う | 
| static String[][] | getBlockCellFormulas(org.apache.poi.ss.usermodel.Sheet sheet,
                    int bStartRowIndex,
                    int bEndRowIndex,
                    int bStartColIndex,
                    int bEndColIndex)対象シートの指定された範囲のセルの数式[行番号][列番号]の形式で取得する。 | 
| static org.apache.poi.ss.usermodel.CellStyle[][] | getBlockCellStyle(org.apache.poi.ss.usermodel.Sheet sheet,
                 int bStartRowIndex,
                 int bEndRowIndex,
                 int bStartColIndex,
                 int bEndColIndex)対象シートの指定された範囲のセルに書かれている文字列をCellStyle[行番号][列番号]の形式で取得する。 | 
| static org.apache.poi.ss.usermodel.CellType[][] | getBlockCellType(org.apache.poi.ss.usermodel.Sheet sheet,
                int bStartRowIndex,
                int bEndRowIndex,
                int bStartColIndex,
                int bEndColIndex)対象シートの指定された範囲のセルのタイプint[行番号][列番号]の形式で取得する。 | 
| static Object[][] | getBlockCellValue(org.apache.poi.ss.usermodel.Sheet sheet,
                 int bStartRowIndex,
                 int bEndRowIndex,
                 int bStartColIndex,
                 int bEndColIndex)対象シートの指定された範囲のセルに書かれている文字列をString[行番号][列番号]の形式で取得する。 | 
| static int[] | getCellIndex(String cellParam,
            String tagName)オプション定義が範囲(XXXCell=n:n)から、nを数値で取得する。 | 
| static int[] | getColumnWidth(org.apache.poi.ss.usermodel.Sheet sheet,
              int bStartColIndex,
              int bEndColIndex)対象シートの指定された範囲の列の高さをint[列番号]の形式で取得する。 | 
| static org.apache.poi.ss.util.CellRangeAddress[] | getMargedCells(org.apache.poi.ss.usermodel.Sheet sheet,
              int baseFromCellRowIndex,
              int baseToCellRowIndex,
              int baseFromCellColIndex,
              int baseToCellColIndex)対象シート上の基準範囲に含まれる結合セルの範囲を取得します。 | 
| static org.apache.poi.ss.util.CellRangeAddress | getMergedAddress(org.apache.poi.ss.usermodel.Sheet sheet,
                int rowIndex,
                int columnIndex)指定された行、列座標のセルを含む結合セルを取得する。 | 
| static List<Object> | getParamValues(ParamInfo info,
              String propertyNameString,
              List<ReportsTagParser<?>> parsers)パラメータ情報(子パラメータを含む)より、置換変数名で指定されている変換値を取得する。 | 
| static ReportSheet | getReportSheet(String sheetName,
              ReportBook reportBook)シート名と一致する帳票シート情報を取得する。 | 
| static float[] | getRowHeight(org.apache.poi.ss.usermodel.Sheet sheet,
            int bStartRowIndex,
            int bEndRowIndex)対象シートの指定された範囲の行の高さをfloat[行番号]の形式で取得する。 | 
| static List<String> | getSheetNames(ReportBook reportBook)シート名リストを取得する。 | 
| static List<Object> | getSheetValues(ReportBook reportBook,
              String propertyName,
              List<ReportsTagParser<?>> parsers)シートの値を取得する。 | 
| static BigDecimal | getSumValue(ParamInfo info,
           String propertyName,
           List<ReportsTagParser<?>> parsers)合計値を取得する。 | 
| static boolean | isEmptyCell(org.apache.poi.ss.usermodel.CellType cellType,
           Object cellValue,
           org.apache.poi.ss.usermodel.CellStyle cellStyle)セルに情報(値、スタイル、タイプ)が設定されているかどうかの判定を行う | 
| static boolean | isEmptyRow(org.apache.poi.ss.usermodel.CellType[] rowCellTypes,
          Object[] rowCellValues,
          org.apache.poi.ss.usermodel.CellStyle[] rowCellStyles)行に情報(値、スタイル、タイプ)が設定されているかどうかの判定を行う | 
public static ReportSheet getReportSheet(String sheetName, ReportBook reportBook)
sheetName - シート名reportBook - 帳票ワークブック情報public static List<String> getSheetNames(ReportBook reportBook)
reportBook - 帳票シート情報public static List<Object> getParamValues(ParamInfo info, String propertyNameString, List<ReportsTagParser<?>> parsers)
置換変数文字列指定方法 タグ名:置換変数名 例) $R[]:金額 $C:日付 $:名前 名前(単純置換の場合は『タグ名:』は省略可…『$:』が補完される) ブロックタグ($BR[]、$BC[])は『.』で子パラメータを指定する。 ブロックタグが複数でも連続して指定可能 ブロックタグ名:置換変数名.ブロックタグ名:置換変数名.タグ名:置換変数名 例) $BR[]:支店.$R[]:担当者 $BR[]:支店.支店名
info - パラメータ情報propertyNameString - 置換変数文字列parsers - 使用中のパーサ群public static List<Object> getSheetValues(ReportBook reportBook, String propertyName, List<ReportsTagParser<?>> parsers)
reportBook - 帳票シート情報propertyName - 単純置換変数parsers - 使用中のパーサ群public static BigDecimal getSumValue(ParamInfo info, String propertyName, List<ReportsTagParser<?>> parsers)
info - パラメータ情報propertyName - 置換変数文字列parsers - 使用中のパーサ群public static org.apache.poi.ss.util.CellRangeAddress getMergedAddress(org.apache.poi.ss.usermodel.Sheet sheet,
                                                                       int rowIndex,
                                                                       int columnIndex)
sheet - 対象シートrowIndex - 行インデックスcolumnIndex - 列インデックスpublic static int[] getCellIndex(String cellParam, String tagName) throws org.bbreak.excella.core.exception.ParseException
cellParam - 範囲指定(n:n)tagName - タグ名称(エラー時出力用)org.bbreak.excella.core.exception.ParseExceptionpublic static Object[][] getBlockCellValue(org.apache.poi.ss.usermodel.Sheet sheet, int bStartRowIndex, int bEndRowIndex, int bStartColIndex, int bEndColIndex)
sheet - 対象となるシートbStartRowIndex - 範囲開始行番号bEndRowIndex - 範囲終了行番号bStartColIndex - 範囲開始列番号bEndColIndex - 範囲終了列番号public static org.apache.poi.ss.usermodel.CellStyle[][] getBlockCellStyle(org.apache.poi.ss.usermodel.Sheet sheet,
                                                                          int bStartRowIndex,
                                                                          int bEndRowIndex,
                                                                          int bStartColIndex,
                                                                          int bEndColIndex)
sheet - 対象となるシートbStartRowIndex - 範囲開始行番号bEndRowIndex - 範囲終了行番号bStartColIndex - 範囲開始列番号bEndColIndex - 範囲終了列番号public static org.apache.poi.ss.usermodel.CellType[][] getBlockCellType(org.apache.poi.ss.usermodel.Sheet sheet,
                                                                        int bStartRowIndex,
                                                                        int bEndRowIndex,
                                                                        int bStartColIndex,
                                                                        int bEndColIndex)
sheet - 対象となるシートbStartRowIndex - 範囲開始行番号bEndRowIndex - 範囲終了行番号bStartColIndex - 範囲開始列番号bEndColIndex - 範囲終了列番号public static String[][] getBlockCellFormulas(org.apache.poi.ss.usermodel.Sheet sheet, int bStartRowIndex, int bEndRowIndex, int bStartColIndex, int bEndColIndex)
sheet - 対象となるシートbStartRowIndex - 範囲開始行番号bEndRowIndex - 範囲終了行番号bStartColIndex - 範囲開始列番号bEndColIndex - 範囲終了列番号public static float[] getRowHeight(org.apache.poi.ss.usermodel.Sheet sheet,
                                   int bStartRowIndex,
                                   int bEndRowIndex)
sheet - 対象となるシートbStartRowIndex - 範囲開始行番号bEndRowIndex - 範囲終了行番号public static int[] getColumnWidth(org.apache.poi.ss.usermodel.Sheet sheet,
                                   int bStartColIndex,
                                   int bEndColIndex)
sheet - 対象となるシートbStartColIndex - 基準範囲の開始列bEndColIndex - 基準範囲の終了列public static org.apache.poi.ss.util.CellRangeAddress[] getMargedCells(org.apache.poi.ss.usermodel.Sheet sheet,
                                                                       int baseFromCellRowIndex,
                                                                       int baseToCellRowIndex,
                                                                       int baseFromCellColIndex,
                                                                       int baseToCellColIndex)
sheet - 対象となるシートbaseFromCellRowIndex - 基準範囲の開始行baseToCellRowIndex - 基準範囲の終了行baseFromCellColIndex - 基準範囲の開始列baseToCellColIndex - 基準範囲の終了列public static boolean isEmptyRow(org.apache.poi.ss.usermodel.CellType[] rowCellTypes,
                                 Object[] rowCellValues,
                                 org.apache.poi.ss.usermodel.CellStyle[] rowCellStyles)
rowCellTypes - 対象行のセルスタイルrowCellValues - 対象行のセルの値rowCellStyles - 対象行のセルタイプpublic static boolean isEmptyCell(org.apache.poi.ss.usermodel.CellType cellType,
                                  Object cellValue,
                                  org.apache.poi.ss.usermodel.CellStyle cellStyle)
cellType - 対象セルのスタイルcellValue - 対象セルの値cellStyle - 対象セルのタイプpublic static void copyPrintSetup(org.apache.poi.ss.usermodel.Workbook workbook,
                                  int fromIdx,
                                  org.apache.poi.ss.usermodel.Sheet toSheet)
workbook - fromIdx、toIdxのシートを含むworkbookfromIdx - コピー元シートのインデックスsheet - コピー先シートCopyright © 2009–2023. All rights reserved.