今回は Cell に定義されているプロパティ。
Cell に定義されているプロパティ
HSSFCell と XSSFCell に共通のプロパティ。 分類は拙者の独断と偏見。
| プロパティ名 | プロパティ値の型 | Read (Getter) |
Write (Setter) |
|---|---|---|---|
| class | java.lang.Class | ☆ | × |
| sheet row rowIndex columnIndex |
Sheet Row int int |
☆ | × |
| booleanCellValue numericCellValue stringCellValue dateCellValue richStringCellValue errorCellValue |
boolean double java.lang.String java.util.Date RichTextString byte |
☆ | × |
| cellValue | java.lang.Object*1 | × | ☆ |
| cellStyle cellType cellFormula cellErrorValue cellComment |
CellStyle int*2 java.lang.String byte Comment |
☆ ☆ ☆ × ☆ |
☆ |
| hyperlink | Hyperlink | ☆ | ☆ |
| cachedFormulaResultType | int*3 | ☆ | × |
プロパティの型で出てきている3つの型
についても見てみましょう。 CellStyle に関しては次回。
RichTextString
| プロパティ名 | プロパティ値の型 | Read (Getter) |
Write (Setter) |
|---|---|---|---|
| class | java.lang.Class | ☆ | × |
| string | java.lang.String | ☆ | × |
HyperLink
まずは org.apache.poi.common.usermodel.Hyperlink
| プロパティ名 | プロパティ値の型 | Read (Getter) |
Write (Setter) |
|---|---|---|---|
| class | java.lang.Class | ☆ | × |
| address | java.lang.String | ☆ | ☆ |
| label | java.lang.String | ☆ | ☆ |
| type | int*4 | ☆ | × |
次は org.apache.poi.ss.usermodel.Hyperlink。これはさっきの Hyperlink のサブタイプです:
| プロパティ名 | プロパティ値の型 | Read (Getter) |
Write (Setter) |
|---|---|---|---|
| firstRow lastRow |
int | ☆ | ☆ |
| firstColumn lastColumn |
int | ☆ | ☆ |
Comment
| プロパティ名 | プロパティ値の型 | Read (Getter) |
Write (Setter) |
|---|---|---|---|
| class | java.lang.Class | ☆ | × |
| row column |
int | ☆ | ☆ |
| string | RichTextString | ☆ | ☆ |
| author | java.lang.String | ☆ | ☆ |
| visible | boolean | ☆ | ☆ |
HSSFCell に特有のプロパティ
上記のプロパティに加えて、HSSFCell に定義されているプロパティ。
| プロパティ名 | プロパティ値の型 | Read (Getter) |
Write (Setter) |
スコープ |
|---|---|---|---|---|
| boundWorkbook | org.apache.poi.hssf.model.Workbook | ☆ | × | protected |
| cellNum | short | ☆ | ☆ | public |
| cellValueRecord | org.apache.poi.hssf.record.CellValueRecordInterface | ☆ | × | protected |
HSSFRichTextString
| プロパティ名 | プロパティ値の型 | Read (Getter) |
Write (Setter) |
スコープ |
|---|---|---|---|---|
| rawUnicodeString | org.apache.poi.hssf.record.UnicodeString | ☆ | × | package |
| unicodeString | org.apache.poi.hssf.record.UnicodeString | ☆ | ☆ | package |
HyperLink
| プロパティ名 | プロパティ値の型 | Read (Getter) |
Write (Setter) |
スコープ |
|---|---|---|---|---|
| shortFilename | java.lang.String | ☆ | ☆ | public |
| textMark | java.lang.String | ☆ | ☆ | public |
Comment
| プロパティ名 | プロパティ値の型 | Read (Getter) |
Write (Setter) |
スコープ |
|---|---|---|---|---|
| lineStyle lineWidth lineStyleColor |
int | ☆ | ☆ | public |
| marginTop marginBottom marginLeft marginRight |
int | ☆ | ☆ | public |
| horizontalAlignment verticalAlignment |
short | ☆ | ☆ | public |
| fillColor noFill |
int boolean |
☆ | ☆ | public |
| noteRecord textObjectRecord |
org.apache.poi.hssf.record.NoteRecord org.apache.poi.hssf.record.TextObjectRecord |
☆ | × | protected |
| anchor | org.apache.poi.hssf.usermodel.HSSFAnchor | ☆ | ☆ | public |
| parent | org.apache.poi.hssf.usermodel.HSSFShape | ☆ | × | public |
| shapeType | int | ☆ | ☆ | public |
*1:実際には boolean, double, String, Date, RichTextString のいずれか。
*2:取り得る値は Cell に定義されている static フィールド:CELL_TYPE_BLANK, CELL_TYPE_BOOLEAN, CELL_TYPE_NUMERIC, CELL_TYPE_STRING, CELL_TYPE_FORMULA, CELL_TYPE_ERROR
*3:取り得る値は Cell に定義されている static フィールド(cellType の値と同じ):CELL_TYPE_BLANK, CELL_TYPE_BOOLEAN, CELL_TYPE_NUMERIC, CELL_TYPE_STRING, CELL_TYPE_FORMULA, CELL_TYPE_ERROR
*4:取り得る値は Hyperlink に定義されている static フィールド:LINK_DOCUMENT, LINK_EMAIL, LINK_FILE, LINK_URL