public class FormatTrackingHSSFListener extends java.lang.Object implements HSSFListener
Constructor and Description |
---|
FormatTrackingHSSFListener(HSSFListener childListener)
Creates a format tracking wrapper around the given listener, using the
default locale for the formats.
|
FormatTrackingHSSFListener(HSSFListener childListener, java.util.Locale locale)
Creates a format tracking wrapper around the given listener, using the given locale for the formats.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
formatNumberDateCell(CellValueRecordInterface cell)
Formats the given numeric of date cells contents as a String, in as close as we can to the way that Excel would do so.
(将给定的日期单元格内容数字格式设置为字符串,尽可能接近 Excel 执行此操作的方式。)
|
int |
getFormatIndex(CellValueRecordInterface cell)
Returns the index of the format string, used by your cell, or -1 if none found
(返回单元格使用的格式字符串的索引,如果没有找到,则返回 -1)
|
java.lang.String |
getFormatString(CellValueRecordInterface cell)
Returns the format string, eg $##.##, used by your cell
(返回单元格使用的格式字符串,例如 $##.##)
|
java.lang.String |
getFormatString(int formatIndex)
Returns the format string, eg $##.##, for the given number format index.
(返回给定数字格式索引的格式字符串,例如 $##.##。)
|
protected int |
getNumberOfCustomFormats() |
protected int |
getNumberOfExtendedFormats() |
void |
processRecord(Record record)
Process this record ourselves, and then pass it on to our child listener
(自己处理这个记录,然后将它传递给我们的子监听器)
|
void |
processRecordInternally(Record record)
Process the record ourselves, but do not pass it on to the child Listener.
(自己处理记录,但不要将其传递给子侦听器。)
|
public FormatTrackingHSSFListener(HSSFListener childListener)
default locale
for the formats.
(使用格式的默认区域设置围绕给定侦听器创建格式跟踪包装器。)
childListener
- the listener to be wrapped
(childListener - 要包装的侦听器)
public FormatTrackingHSSFListener(HSSFListener childListener, java.util.Locale locale)
childListener
- the listener to be wrapped
(childListener - 要包装的侦听器)
locale
- the locale for the formats
(locale - 格式的语言环境)
protected int getNumberOfCustomFormats()
protected int getNumberOfExtendedFormats()
public void processRecord(Record record)
processRecord
in interface
HSSFListener
(接口 HSSFListener 中的 processRecord)
record
- the record to be processed
(record - 要处理的记录)
public void processRecordInternally(Record record)
record
- the record to be processed
(record - 要处理的记录)
public java.lang.String formatNumberDateCell(CellValueRecordInterface cell)
cell
- the cell
(细胞——细胞)
public java.lang.String getFormatString(int formatIndex)
formatIndex
- the format index
(formatIndex - 格式索引)
public java.lang.String getFormatString(CellValueRecordInterface cell)
cell
- the cell
(细胞——细胞)
public int getFormatIndex(CellValueRecordInterface cell)
cell
- the cell
(细胞——细胞)
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.