Documentation
¶
Index ¶
- Constants
- Variables
- func ASCIIStringPack(s string) []byte
- func ASCIIStringPack2(s string) []byte
- func BackupRecord(_ int) []byte
- func Biff8BOFRecord(recType SP_H) []byte
- func BlankRecord(row int, col int, xfIDX int) []byte
- func BookBoolRecord() []byte
- func BottomMarginRecord(arg1 float64) []byte
- func BoundSheetRecord(streamPos int, visibility int, sheet string) []byte
- func CalcCountRecord(calcCount int) []byte
- func CalcModeRecord(calcMode int) []byte
- func CellXFRecord(fontIdx int) []byte
- func CodepageBiff8Record() []byte
- func DSFRecord() []byte
- func DateModeRecord(from1904 bool) []byte
- func DefaultCellXFRecord() []byte
- func DefaultFontRecord() []byte
- func DefaultRowHeightRecord(options, defHeight int) []byte
- func DefaultWindow2Record() []byte
- func DefaultXFRecord() []byte
- func DeltaRecord(delta float64) []byte
- func DimensionsRecord(firstUsedRow, lastUsedRow, firstUsedCol, lastUsedCol int) []byte
- func EOFRecord() []byte
- func FillBytes(size int, value byte) []byte
- func FillInt(size int, value int) []int
- func FnGroupCountRecord() []byte
- func FooterRecord(footerStr string) []byte
- func GridSetRecord(arg1 int) []byte
- func GutsRecord(rowGutWidth, colGutHeight, rowVisibleLevels, colVisibleLevels int) []byte
- func HCenterRecord(arg1 int) []byte
- func HeaderRecord(headerStr string) []byte
- func HideObjRecord() []byte
- func HorizontalPageBreaksRecord() []byte
- func InteraceEndRecord() []byte
- func InteraceHdrRecord() []byte
- func IterationRecord(iterationsOn int) []byte
- func LabelSSTRecord(row int, col int, xfIDX int, sstIDX int) []byte
- func LeftMarginRecord(arg1 float64) []byte
- func MMSRecord() []byte
- func NumberFormatRecord(idx int, str string) []byte
- func ObjectProtectRecord(objprotect int) []byte
- func PaletteRecord() []byte
- func PasswordRecord(_ string) []byte
- func PrecisionRecord(use_real_values bool) []byte
- func PrintGridLinesRecord(arg1 int) []byte
- func PrintHeadersRecord(printHeaders int) []byte
- func Prot4RevPassRecord() []byte
- func Prot4RevRecord() []byte
- func ProtectRecord(protect int) []byte
- func RefModeRecord(refMode int) []byte
- func RefreshAllRecord() []byte
- func RightMarginRecord(arg1 float64) []byte
- func RowRecord(index, firstCol, lastCol, heightOptions, options int) []byte
- func SaveRecalcRecord(recalc int) []byte
- func ScenProtectRecord(arg1 int) []byte
- func SetupPageRecord() []byte
- func SingleHRecord(RecID int, hNum int) []byte
- func StyleRecord() []byte
- func TabIDRecord(sheetCount int) []byte
- func TopMarginRecord(arg1 float64) []byte
- func U16StringPack(s string) []byte
- func UseSelfsRecord() []byte
- func VCenterRecord(arg1 int) []byte
- func VerticalPageBreaksRecord() []byte
- func WSBoolRecord(options int) []byte
- func Window1Record() []byte
- func Window2Record(...) []byte
- func WindowProtectRecord(wndprotect int) []byte
- func WriteAccessRecord(owner []byte) []byte
- type BiffRecord
- type Cell
- type SP_B
- type SP_H
- type SP_I
- type SP_L
- type SP_d
- type SP_h
- type SP_l
- type SharedStringTable
- type Workbook
- type Worksheet
- type XFStyle
- type XlsDoc
Constants ¶
View Source
const ( // stream types Biff8BOFRecord__BOOK_GLOBAL = 0x0005 Biff8BOFRecord__VB_MODULE = 0x0006 Biff8BOFRecord__WORKSHEET = 0x0010 Biff8BOFRecord__CHART = 0x0020 Biff8BOFRecord__MACROSHEET = 0x0040 Biff8BOFRecord__WORKSPACE = 0x0100 )
View Source
const CONTINUE_ID = 0x003C
View Source
const DefaultCellXFStyle = 0x11
View Source
const DefaultRowHeightOptions = 0x00FF & 0x07FFF
View Source
const FIRST_USER_DEFINED_NUM_FORMAT_IDX = 164
View Source
const MIN_LIMIT = 0x1000
View Source
const MaxSSTCellLength = 0x2000
View Source
const MaxSSTLength = 0x2020
View Source
const SECTOR_SIZE = 0x0200
View Source
const SID_END_OF_CHAIN = -2
View Source
const SID_FREE_SECTOR = -1
View Source
const SID_USED_BY_MSAT = -4
View Source
const SID_USED_BY_SAT = -3
Variables ¶
View Source
var SP_H_0 = []byte{0x00, 0x00}
View Source
var SP_H_1 = []byte{0x01, 0x00}
View Source
var StdNumFormatString = []string{
"general",
"0",
"0.00",
"#,##0",
"#,##0.00",
"\"$\"#,##0_);(\"$\"#,##0)",
"\"$\"#,##0_);[Red](\"$\"#,##0)",
"\"$\"#,##0.00_);(\"$\"#,##0.00)",
"\"$\"#,##0.00_);[Red](\"$\"#,##0.00)",
"0%",
"0.00%",
"0.00E+00",
"# ?/?",
"# ??/??",
"M/D/YY",
"D-MMM-YY",
"D-MMM",
"MMM-YY",
"h:mm AM/PM",
"h:mm:ss AM/PM",
"h:mm",
"h:mm:ss",
"M/D/YY h:mm",
}
Functions ¶
func ASCIIStringPack ¶
func ASCIIStringPack2 ¶
func Biff8BOFRecord ¶
func BookBoolRecord ¶
func BookBoolRecord() []byte
func BottomMarginRecord ¶
func CalcCountRecord ¶
func CalcModeRecord ¶
func CellXFRecord ¶
func CodepageBiff8Record ¶
func CodepageBiff8Record() []byte
func DateModeRecord ¶
func DefaultCellXFRecord ¶
func DefaultCellXFRecord() []byte
func DefaultFontRecord ¶
func DefaultFontRecord() []byte
func DefaultRowHeightRecord ¶
func DefaultWindow2Record ¶
func DefaultWindow2Record() []byte
func DefaultXFRecord ¶
func DefaultXFRecord() []byte
func DeltaRecord ¶
func DimensionsRecord ¶
func FnGroupCountRecord ¶
func FnGroupCountRecord() []byte
func FooterRecord ¶
func GridSetRecord ¶
func GutsRecord ¶
func HCenterRecord ¶
func HeaderRecord ¶
func HideObjRecord ¶
func HideObjRecord() []byte
func HorizontalPageBreaksRecord ¶
func HorizontalPageBreaksRecord() []byte
func InteraceEndRecord ¶
func InteraceEndRecord() []byte
func InteraceHdrRecord ¶
func InteraceHdrRecord() []byte
func IterationRecord ¶
func LeftMarginRecord ¶
func NumberFormatRecord ¶
func ObjectProtectRecord ¶
func PaletteRecord ¶
func PaletteRecord() []byte
func PasswordRecord ¶
func PrecisionRecord ¶
func PrintGridLinesRecord ¶
func PrintHeadersRecord ¶
func Prot4RevPassRecord ¶
func Prot4RevPassRecord() []byte
func Prot4RevRecord ¶
func Prot4RevRecord() []byte
func ProtectRecord ¶
func RefModeRecord ¶
func RefreshAllRecord ¶
func RefreshAllRecord() []byte
func RightMarginRecord ¶
func SaveRecalcRecord ¶
func ScenProtectRecord ¶
func SetupPageRecord ¶
func SetupPageRecord() []byte
func SingleHRecord ¶
func StyleRecord ¶
func StyleRecord() []byte
func TabIDRecord ¶
func TopMarginRecord ¶
func U16StringPack ¶
func UseSelfsRecord ¶
func UseSelfsRecord() []byte
func VCenterRecord ¶
func VerticalPageBreaksRecord ¶
func VerticalPageBreaksRecord() []byte
func WSBoolRecord ¶
func Window1Record ¶
func Window1Record() []byte
func Window2Record ¶
func WindowProtectRecord ¶
func WriteAccessRecord ¶
Types ¶
type BiffRecord ¶
type BiffRecord struct {
// contains filtered or unexported fields
}
func NewBiffRecord ¶
func NewBiffRecord(RecID SP_H, RecData []byte) *BiffRecord
func (*BiffRecord) Get ¶
func (r *BiffRecord) Get() []byte
func (*BiffRecord) GetRecHeader ¶
func (r *BiffRecord) GetRecHeader() []byte
type SharedStringTable ¶
type SharedStringTable struct {
}
func NewSharedStringTable ¶
func NewSharedStringTable() *SharedStringTable
func (*SharedStringTable) AddStr ¶
func (sst *SharedStringTable) AddStr(value string) int
func (*SharedStringTable) GetBiffRecord ¶
func (sst *SharedStringTable) GetBiffRecord() []byte
type Workbook ¶
type Workbook struct {
Owner string
Worksheets []*Worksheet
SST *SharedStringTable
Style *XFStyle
}
func NewWorkbook ¶
func NewWorkbook() *Workbook
func (*Workbook) BoundsSheetsRec ¶
func (*Workbook) GetBiffData ¶
type Worksheet ¶
type Worksheet struct {
Name string
SST *SharedStringTable
Grid map[uint32]Cell
RowsIndex map[int]bool
}
func NewWorksheet ¶
func NewWorksheet(name string, sst *SharedStringTable) *Worksheet
func (*Worksheet) GetBiffData ¶
func (*Worksheet) GetRowCellsBiffData ¶
func (*Worksheet) GetRowsBiffData ¶
type XlsDoc ¶
func (*XlsDoc) BuildDirectory ¶
func (xls *XlsDoc) BuildDirectory()
func (*XlsDoc) WriteHeader ¶
func (xls *XlsDoc) WriteHeader()
Click to show internal directories.
Click to hide internal directories.