Documentation
¶
Index ¶
- Constants
- func DetectExcelContentType(fileName string) (err error, bookType TExcelWorkbookType, textEncoding TTextEnconding, ...)
- func TimeFromExcelTime(excelTime float64, date1904 bool) time.Time
- func UTF16BytesToUTF8Bytes(b []byte, o binary.ByteOrder) []byte
- type IExcelFormatter
- type ITableDocumentScanner
- type ITableSheetInfo
- type ReadSeekCloser
- type TExcelWorkbookType
- type TSheetHideLevel
- type TTextEnconding
Constants ¶
View Source
const (
MJD_0 = float64(2400000.5)
)
Variables ¶
This section is empty.
Functions ¶
func DetectExcelContentType ¶
func DetectExcelContentType(fileName string) (err error, bookType TExcelWorkbookType, textEncoding TTextEnconding, BOMPresent []byte)
func TimeFromExcelTime ¶
Convert an excelTime representation (stored as a floating point number) to a time.Time.
Types ¶
type IExcelFormatter ¶
type IExcelFormatter interface {
DisableFormatting()
EnableFormatting()
AllowScientific()
DenyScientific()
SetDateFixedFormat(value string)
SetDecimalSeparator(value string)
SetThousandSeparator(value string)
SetTrimOn()
SetTrimOff()
FormatValue(cellValue string, cellType string, fullFormat *parsedNumberFormat) (string, error)
}
type ITableDocumentScanner ¶
type ITableDocumentScanner interface {
io.Closer
FormatterAvailable() bool
SetI18n(string) error
Formatter() IExcelFormatter
GetSheets() []ITableSheetInfo
GetCurrentSheetId() int
SetSheetId(id int) error
Scan() error
GetLastScanError() error
GetScanned() []string
}
func NewTableStream ¶
func NewTableStream(fileName string) (error, ITableDocumentScanner)
func NewXLSStream ¶
func NewXLSStream(fileName string) (error, ITableDocumentScanner)
func NewXLSXStream ¶
func NewXLSXStream(fileName string) (error, ITableDocumentScanner)
type ITableSheetInfo ¶
type ITableSheetInfo interface {
GetName() string
GetHideLevel() TSheetHideLevel
}
type ReadSeekCloser ¶
type ReadSeekCloser interface {
io.ReadCloser
io.Seeker
}
type TExcelWorkbookType ¶
type TExcelWorkbookType byte
const ( TypeExcelWorkbookUnknown TExcelWorkbookType = 0 TypeExcelWorkbookXLSX TExcelWorkbookType = 1 TypeExcelWorkbookXLS TExcelWorkbookType = 2 TypeExcelWorkbookXML TExcelWorkbookType = 3 TypeExcelWorkbookSingleHTML TExcelWorkbookType = 4 )
type TSheetHideLevel ¶
type TSheetHideLevel byte
const ( TableSheetVisible TSheetHideLevel = 0 TableSheetHidden TSheetHideLevel = 1 TableSheetVeryHidden TSheetHideLevel = 2 )
type TTextEnconding ¶
type TTextEnconding byte
const ( EncodingUnknown TTextEnconding = 0 EncodingUTF8 TTextEnconding = 1 EncodingUTF16BE TTextEnconding = 2 EncodingUTF16LE TTextEnconding = 3 )
Click to show internal directories.
Click to hide internal directories.