public class ExcelReport extends AbstractReport
<Report name="ReportTest" type="Excel" template="${Report.dir}/table.xls" sheet="Sheet1"> <Script ... /> <Source ... /> </Report>Source要素については、
SourceFactory
を参照してください。
Script要素については、ScriptParserFactory
を参照してください。修飾子とタイプ | フィールドと説明 |
---|---|
protected org.apache.poi.hssf.usermodel.HSSFSheet |
orgSheet |
protected org.apache.poi.hssf.usermodel.HSSFWorkbook |
result |
protected org.apache.poi.hssf.usermodel.HSSFSheet |
sheet |
protected org.apache.poi.hssf.usermodel.HSSFWorkbook |
tmpBook |
コンストラクタと説明 |
---|
ExcelReport() |
修飾子とタイプ | メソッドと説明 |
---|---|
void |
addRow(int row)
現在のページに行を追加します。
|
void |
addRow(int dst,
int src)
現在のページに、templateから書式をコピーして行を追加します。
|
void |
addRow(int dst,
int src,
int colFr,
int colTo)
現在のページに、templateから書式をコピーして行を追加します。
|
void |
appendTo(String dstName)
現在処理中のページを、指定されたページに追加します。
|
void |
appendTo(String dstName,
boolean bBreak)
現在処理中のページを、指定されたページに追加します。
|
void |
clearCell(int col,
int row)
セルをクリアします。
|
void |
clearCell(String pos)
セルをクリアします。
|
protected short |
convertBorder(Border border) |
protected void |
copyCell(org.apache.poi.hssf.usermodel.HSSFCell dst,
org.apache.poi.hssf.usermodel.HSSFCell src)
セルの内容をコピーします。
|
void |
copyCell(int fcol,
int frow,
int tcol,
int trow)
セルの値をコピーします。
|
void |
copyCell(String fpos,
String tpos)
セルの値をコピーします。
|
protected void |
copyRow(org.apache.poi.hssf.usermodel.HSSFRow dst,
org.apache.poi.hssf.usermodel.HSSFRow src)
行の内容をコピーします。
|
protected void |
copySheet(org.apache.poi.hssf.usermodel.HSSFSheet dst,
org.apache.poi.hssf.usermodel.HSSFSheet src)
ページの内容をコピーします。
|
void |
endPage()
現在処理中のページに改ページを追加します。
|
void |
endPage(int row)
現在処理中のページに改ページを追加します。
|
void |
endRow()
行の処理を終了します。
|
void |
exit()
処理を終了します。
|
Object |
getCell(int col,
int row)
セルから値を取得します。
|
Object |
getCell(String pos)
セルから値を取得します。
|
String |
getContentType()
サーブレットのContentTypeヘッダを取得します。
|
String |
getExtension()
ファイルの拡張子を返します。
|
Object |
getResult()
帳票の出力結果をオブジェクトとして取得します。
|
protected String |
getTemplateName(String name)
templateシートの名前を取得します。
|
void |
init(jp.co.sds_corp.util.config.IConfiguration config)
設定情報で初期化します。
|
void |
loadFile(String template)
ファイルを読み込みます。
|
void |
loadPage(String sheetName)
ページを読み込みます。
|
void |
loadPage(String newName,
String orgName)
ページに名前をつけて読み込みます。
|
void |
mergeCell(int colFr,
int rowFr,
int colTo,
int rowTo)
セルを結合します。
|
void |
mergeCell(String fpos,
String tpos)
セルを結合します。
|
void |
print()
帳票を出力します。
|
void |
print(OutputStream out)
帳票を出力します。
|
void |
setBorder(int col,
int row,
int location,
Border border)
セルに式を設定します。
|
void |
setBorder(String pos,
int location,
Border border)
セルに罫線を設定します。
|
void |
setCell(int col,
int row,
Object data)
セルに値を設定します。
|
void |
setCell(String pos,
Object data)
セルに値を設定します。
|
void |
setCellFormula(org.apache.poi.hssf.usermodel.HSSFSheet sheet,
int col,
int row,
String formula)
セルに式を設定します。
|
void |
setCellFormula(int col,
int row,
String formula)
セルに式を設定します。
|
void |
setCellFormula(String pos,
String formula)
セルに式を設定します。
|
checkNull, getAttribute, getProperty, getScriptParser, getSource, getType, isDebug, isEmpty, log, setAttribute, setDebug, setProperty, setScriptParser, setSource, setupResponse, setupResponse, setupResponse, testNumber
protected org.apache.poi.hssf.usermodel.HSSFWorkbook result
protected org.apache.poi.hssf.usermodel.HSSFSheet sheet
protected org.apache.poi.hssf.usermodel.HSSFWorkbook tmpBook
protected org.apache.poi.hssf.usermodel.HSSFSheet orgSheet
public void init(jp.co.sds_corp.util.config.IConfiguration config) throws Exception
init
インタフェース内 IReport
init
クラス内 AbstractReport
config
- 設定情報Exception
public Object getResult()
public void print() throws Exception
print
インタフェース内 IReport
print
クラス内 AbstractReport
Exception
public void print(OutputStream out) throws Exception
out
- 出力先Exception
public String getContentType()
public String getExtension()
protected String getTemplateName(String name)
name
- シート名public void loadFile(String template) throws Exception
template
- ファイル名Exception
public void loadPage(String sheetName) throws Exception
sheetName
- ページ名Exception
public void loadPage(String newName, String orgName) throws Exception
newName
- 新しいページ名orgName
- 読み込むページ名Exception
public void appendTo(String dstName) throws Exception
dstName
- 追加するページException
public void appendTo(String dstName, boolean bBreak) throws Exception
dstName
- 追加するページbBreak
- 改ページフラグException
public void endPage()
public void endPage(int row)
row
- 改ページを追加する行protected void copySheet(org.apache.poi.hssf.usermodel.HSSFSheet dst, org.apache.poi.hssf.usermodel.HSSFSheet src)
dst
- コピー先src
- コピー元protected void copyRow(org.apache.poi.hssf.usermodel.HSSFRow dst, org.apache.poi.hssf.usermodel.HSSFRow src)
dst
- コピー先src
- コピー元protected void copyCell(org.apache.poi.hssf.usermodel.HSSFCell dst, org.apache.poi.hssf.usermodel.HSSFCell src)
dst
- コピー先src
- コピー元public Object getCell(String pos) throws Exception
pos
- セルの位置Exception
public Object getCell(int col, int row) throws Exception
col
- セルの桁row
- セルの行Exception
public void setCell(String pos, Object data) throws Exception
pos
- セルの位置data
- 設定する値Exception
public void setCell(int col, int row, Object data) throws Exception
col
- セルの桁row
- セルの行data
- 設定する値Exception
public void setCellFormula(String pos, String formula) throws Exception
pos
- セルの位置formula
- 設定する式Exception
public void setCellFormula(int col, int row, String formula) throws Exception
col
- セルの桁row
- セルの行formula
- 設定する式Exception
public void setCellFormula(org.apache.poi.hssf.usermodel.HSSFSheet sheet, int col, int row, String formula) throws Exception
sheet
- ページcol
- セルの桁row
- セルの行formula
- 設定する式Exception
public void setBorder(String pos, int location, Border border) throws Exception
pos
- セルの位置location
- 罫線の位置border
- 設定する罫線Exception
public void setBorder(int col, int row, int location, Border border) throws Exception
col
- セルの桁row
- セルの行location
- 罫線の位置border
- 設定する罫線Exception
protected short convertBorder(Border border)
public void copyCell(String fpos, String tpos) throws Exception
fpos
- コピー元のセルの位置tpos
- コピー先のセルの位置Exception
public void copyCell(int fcol, int frow, int tcol, int trow) throws Exception
fcol
- コピー元のセルの桁frow
- コピー元のセルの行tcol
- コピー先のセルの桁trow
- コピー先のセルの行Exception
public void clearCell(String pos) throws Exception
pos
- セルの位置Exception
public void clearCell(int col, int row) throws Exception
col
- コピー元のセルの桁row
- コピー元のセルの行Exception
public void mergeCell(String fpos, String tpos) throws Exception
fpos
- 開始位置tpos
- 終了位置Exception
public void mergeCell(int colFr, int rowFr, int colTo, int rowTo) throws Exception
colFr
- 開始位置rowFr
- 開始位置colTo
- 終了位置rowTo
- 終了位置Exception
public void addRow(int row) throws Exception
row
- 追加する位置Exception
public void addRow(int dst, int src) throws Exception
dst
- 追加する位置src
- 書式の行の位置Exception
public void addRow(int dst, int src, int colFr, int colTo) throws Exception
dst
- 追加する位置src
- 書式の行の位置colFr
- 書式の桁開始位置colTo
- 書式の桁終了位置Exception
Copyright © 2021 S.D.S Co.,Ltd.. All rights reserved.