Versions in this module Expand all Collapse all v1 v1.9.0 Mar 14, 2020 v1.8.0 Feb 17, 2020 v0 v0.4.82 Aug 1, 2020 v0.4.81 Aug 1, 2020 v0.4.80 Jul 16, 2020 v0.4.79 May 2, 2020 v0.4.77 May 2, 2020 v0.4.76 Mar 26, 2020 v0.4.75 Mar 14, 2020 v0.1.1 Mar 14, 2020 Changes in this version + const Baskerville + const Bodoni + const ColWidth + const Courier + const DataValidationOperatorBetween + const DataValidationOperatorEqual + const DataValidationOperatorGreaterThan + const DataValidationOperatorGreaterThanOrEqual + const DataValidationOperatorLessThan + const DataValidationOperatorLessThanOrEqual + const DataValidationOperatorNotBetween + const DataValidationOperatorNotEqual + const DataValidationTypeCustom + const DataValidationTypeDate + const DataValidationTypeDecimal + const DataValidationTypeTextLeng + const DataValidationTypeTime + const DataValidationTypeWhole + const DateFormat_dd_mm_yy + const DateTimeFormat_d_m_yy_h_mm + const DecimalFormat + const Excel2006MaxRowCount + const Excel2006MaxRowIndex + const GeneralFormat + const GillSans + const Helvetica + const IntegerFormat + const MJD_0 + const MJD_JD2000 + const NoRowLimit + const RGB_Black + const RGB_Dark_Green + const RGB_Dark_Red + const RGB_Light_Green + const RGB_Light_Red + const RGB_White + const Solid_Cell_Fill + const TEMPLATE_DOCPROPS_APP + const TEMPLATE_DOCPROPS_CORE + const TEMPLATE_XL_THEME_THEME + const TEMPLATE__RELS_DOT_RELS + const TimesNewRoman + var AlreadyOnLastSheetError = errors.New("NextSheet() called, but already on last sheet") + var BuiltStreamFileBuilderError = errors.New("StreamFileBuilder has already been built, functions may no longer be used") + var DefaultDateFormat = builtInNumFmt[14] + var DefaultDateOptions = DateTimeOptions + var DefaultDateTimeFormat = builtInNumFmt[22] + var DefaultDateTimeOptions = DateTimeOptions + var HSLModel = color.ModelFunc(hslModel) + var NoCurrentSheetError = errors.New("no Current Sheet") + var UnsupportedCellTypeError = errors.New("the given cell type is not supported") + var WrongNumberOfRowsError = errors.New(...) + func ColIndexToLetters(colRef int) string + func ColLettersToIndex(letters string) int + func FileToSlice(path string) ([][][]string, error) + func FileToSliceUnmerged(path string) ([][][]string, error) + func GetCellIDStringFromCoords(x, y int) string + func GetCellIDStringFromCoordsWithFixed(x, y int, xFixed, yFixed bool) string + func GetCoordsFromCellIDString(cellIDString string) (x, y int, error error) + func HSLToRGB(h, s, l float64) (r, g, b uint8) + func MakeDefaultContentTypes() (types xlsxTypes) + func NewXlsxCellDataValidation(allowBlank bool) *xlsxCellDataValidation + func RGBToHSL(r, g, b uint8) (h, s, l float64) + func RowIndexToString(rowRef int) string + func SetDefaultFont(size int, name string) + func TimeFromExcelTime(excelTime float64, date1904 bool) time.Time + func TimeToExcelTime(t time.Time, date1904 bool) float64 + func TimeToUTCTime(t time.Time) time.Time + type Alignment struct + Horizontal string + Indent int + ShrinkToFit bool + TextRotation int + Vertical string + WrapText bool + func DefaultAlignment() *Alignment + type AutoFilter struct + BottomRightCell string + TopLeftCell string + type Border struct + Bottom string + BottomColor string + Left string + LeftColor string + Right string + RightColor string + Top string + TopColor string + func DefaultBorder() *Border + func NewBorder(left, right, top, bottom string) *Border + type Cell struct + DataValidation *xlsxCellDataValidation + HMerge int + Hidden bool + NumFmt string + Row *Row + VMerge int + Value string + func NewCell(r *Row) *Cell + func (c *Cell) Bool() bool + func (c *Cell) Float() (float64, error) + func (c *Cell) FormattedValue() (string, error) + func (c *Cell) Formula() string + func (c *Cell) GeneralNumeric() (string, error) + func (c *Cell) GeneralNumericWithoutScientific() (string, error) + func (c *Cell) GetNumberFormat() string + func (c *Cell) GetStyle() *Style + func (c *Cell) GetTime(date1904 bool) (t time.Time, err error) + func (c *Cell) Int() (int, error) + func (c *Cell) Int64() (int64, error) + func (c *Cell) IsTime() bool + func (c *Cell) Merge(hcells, vcells int) + func (c *Cell) SetBool(b bool) + func (c *Cell) SetDataValidation(dd *xlsxCellDataValidation) + func (c *Cell) SetDate(t time.Time) + func (c *Cell) SetDateTime(t time.Time) + func (c *Cell) SetDateTimeWithFormat(n float64, format string) + func (c *Cell) SetDateWithOptions(t time.Time, options DateTimeOptions) + func (c *Cell) SetFloat(n float64) + func (c *Cell) SetFloatWithFormat(n float64, format string) + func (c *Cell) SetFormat(format string) + func (c *Cell) SetFormula(formula string) + func (c *Cell) SetInt(n int) + func (c *Cell) SetInt64(n int64) + func (c *Cell) SetString(s string) + func (c *Cell) SetStringFormula(formula string) + func (c *Cell) SetStyle(style *Style) + func (c *Cell) SetValue(n interface{}) + func (c *Cell) String() string + func (c *Cell) Type() CellType + type CellInterface interface + FormattedValue func() string + String func() string + type CellMetadata struct + var DefaultDateCellMetadata CellMetadata + var DefaultDecimalCellMetadata CellMetadata + var DefaultIntegerCellMetadata CellMetadata + var DefaultNumericCellMetadata CellMetadata + var DefaultStringCellMetadata CellMetadata + func MakeCellMetadata(cellType CellType, streamStyle StreamStyle) CellMetadata + func (cm CellMetadata) Ptr() *CellMetadata + type CellType int + const CellTypeBool + const CellTypeDate + const CellTypeError + const CellTypeInline + const CellTypeNumeric + const CellTypeString + const CellTypeStringFormula + func (ct CellType) Ptr() *CellType + type Col struct + Collapsed bool + DataValidation []*xlsxCellDataValidation + Hidden bool + Max int + Min int + OutlineLevel uint8 + Width float64 + func (c *Col) GetStreamStyle() StreamStyle + func (c *Col) GetStyle() *Style + func (c *Col) SetCellMetadata(cellMetadata CellMetadata) + func (c *Col) SetDataValidation(dd *xlsxCellDataValidation, start, end int) + func (c *Col) SetDataValidationWithStart(dd *xlsxCellDataValidation, start int) + func (c *Col) SetStreamStyle(style StreamStyle) + func (c *Col) SetStyle(style *Style) + func (c *Col) SetType(cellType CellType) + type DataValidationErrorStyle int + const StyleInformation + const StyleStop + const StyleWarning + type DataValidationOperator int + type DataValidationType int + type DateTimeOptions struct + ExcelTimeFormat string + Location *time.Location + type File struct + Date1904 bool + DefinedNames []*xlsxDefinedName + Sheet map[string]*Sheet + Sheets []*Sheet + func NewFile() *File + func OpenBinary(bs []byte) (*File, error) + func OpenBinaryWithRowLimit(bs []byte, rowLimit int) (*File, error) + func OpenFile(fileName string) (file *File, err error) + func OpenFileWithRowLimit(fileName string, rowLimit int) (file *File, err error) + func OpenReaderAt(r io.ReaderAt, size int64) (*File, error) + func OpenReaderAtWithRowLimit(r io.ReaderAt, size int64, rowLimit int) (*File, error) + func ReadZip(f *zip.ReadCloser) (*File, error) + func ReadZipReader(r *zip.Reader) (*File, error) + func ReadZipReaderWithRowLimit(r *zip.Reader, rowLimit int) (*File, error) + func ReadZipWithRowLimit(f *zip.ReadCloser, rowLimit int) (*File, error) + func (f *File) AddSheet(sheetName string) (*Sheet, error) + func (f *File) AppendSheet(sheet Sheet, sheetName string) (*Sheet, error) + func (f *File) MarshallParts() (map[string]string, error) + func (f *File) Save(path string) (err error) + func (f *File) ToSlice() (output [][][]string, err error) + func (f *File) ToSliceUnmerged() (output [][][]string, err error) + func (f *File) Write(writer io.Writer) (err error) + type Fill struct + BgColor string + FgColor string + PatternType string + var FillGreen *Fill + var FillRed *Fill + var FillWhite *Fill + func DefaultFill() *Fill + func NewFill(patternType, fgColor, bgColor string) *Fill + type Font struct + Bold bool + Charset int + Color string + Family int + Italic bool + Name string + Size int + Underline bool + var FontBold *Font + var FontItalic *Font + var FontUnderlined *Font + func DefaultFont() *Font + func NewFont(size int, name string) *Font + type HSL struct + H float64 + L float64 + S float64 + func (c HSL) RGBA() (uint32, uint32, uint32, uint32) + type Pane struct + ActivePane string + State string + TopLeftCell string + XSplit float64 + YSplit float64 + type RefTable struct + func MakeSharedStringRefTable(source *xlsxSST) *RefTable + func NewSharedStringRefTable() *RefTable + func (rt *RefTable) AddString(str string) int + func (rt *RefTable) Length() int + func (rt *RefTable) ResolveSharedString(index int) string + type Row struct + Cells []*Cell + Height float64 + Hidden bool + OutlineLevel uint8 + Sheet *Sheet + func (r *Row) AddCell() *Cell + func (r *Row) ReadStruct(ptr interface{}) error + func (r *Row) SetHeight(ht float64) + func (r *Row) SetHeightCM(ht float64) + func (r *Row) WriteSlice(e interface{}, cols int) int + func (r *Row) WriteStruct(e interface{}, cols int) int + type Sheet struct + AutoFilter *AutoFilter + Cols []*Col + File *File + Hidden bool + MaxCol int + MaxRow int + Name string + Rows []*Row + Selected bool + SheetFormat SheetFormat + SheetViews []SheetView + func (s *Sheet) AddRow() *Row + func (s *Sheet) AddRowAtIndex(index int) (*Row, error) + func (s *Sheet) Col(idx int) *Col + func (s *Sheet) RemoveRowAtIndex(index int) error + func (s *Sheet) Row(idx int) *Row + func (s *Sheet) SetColWidth(startcol, endcol int, width float64) error + func (sh *Sheet) Cell(row, col int) *Cell + type SheetFormat struct + DefaultColWidth float64 + DefaultRowHeight float64 + OutlineLevelCol uint8 + OutlineLevelRow uint8 + type SheetView struct + Pane *Pane + type StreamCell struct + func NewDateStreamCell(t time.Time) StreamCell + func NewIntegerStreamCell(cellData int) StreamCell + func NewStreamCell(cellData string, cellStyle StreamStyle, cellType CellType) StreamCell + func NewStringStreamCell(cellData string) StreamCell + func NewStyledIntegerStreamCell(cellData int, cellStyle StreamStyle) StreamCell + func NewStyledStringStreamCell(cellData string, cellStyle StreamStyle) StreamCell + type StreamFile struct + func (sf *StreamFile) Close() error + func (sf *StreamFile) Error() error + func (sf *StreamFile) Flush() + func (sf *StreamFile) NextSheet() error + func (sf *StreamFile) Write(cells []string) error + func (sf *StreamFile) WriteAll(records [][]string) error + func (sf *StreamFile) WriteAllS(records [][]StreamCell) error + func (sf *StreamFile) WriteS(cells []StreamCell) error + func (sf *StreamFile) WriteWithColumnDefaultMetadata(cells []string) error + type StreamFileBuilder struct + func NewStreamFileBuilder(writer io.Writer) *StreamFileBuilder + func NewStreamFileBuilderForPath(path string) (*StreamFileBuilder, error) + func (sb *StreamFileBuilder) AddSheet(name string, headers []string, cellTypes []*CellType) error + func (sb *StreamFileBuilder) AddSheetS(name string, columnStyles []StreamStyle) error + func (sb *StreamFileBuilder) AddSheetWithDefaultColumnMetadata(name string, headers []string, columnsDefaultCellMetadata []*CellMetadata) error + func (sb *StreamFileBuilder) AddStreamStyle(streamStyle StreamStyle) error + func (sb *StreamFileBuilder) AddStreamStyleList(streamStyles []StreamStyle) error + func (sb *StreamFileBuilder) AddValidation(sheetIndex, colIndex, rowStartIndex int, validation *xlsxCellDataValidation) + func (sb *StreamFileBuilder) Build() (*StreamFile, error) + type StreamStyle struct + var StreamStyleBoldInteger StreamStyle + var StreamStyleBoldString StreamStyle + var StreamStyleDefaultDate StreamStyle + var StreamStyleDefaultDecimal StreamStyle + var StreamStyleDefaultInteger StreamStyle + var StreamStyleDefaultString StreamStyle + var StreamStyleFromColumn StreamStyle + var StreamStyleItalicInteger StreamStyle + var StreamStyleItalicString StreamStyle + var StreamStyleUnderlinedInteger StreamStyle + var StreamStyleUnderlinedString StreamStyle + func MakeDateStyle(font *Font, fill *Fill, alignment *Alignment, border *Border) StreamStyle + func MakeDecimalStyle(font *Font, fill *Fill, alignment *Alignment, border *Border) StreamStyle + func MakeIntegerStyle(font *Font, fill *Fill, alignment *Alignment, border *Border) StreamStyle + func MakeStringStyle(font *Font, fill *Fill, alignment *Alignment, border *Border) StreamStyle + func MakeStyle(numFormatId int, font *Font, fill *Fill, alignment *Alignment, border *Border) StreamStyle + type Style struct + Alignment Alignment + ApplyAlignment bool + ApplyBorder bool + ApplyFill bool + ApplyFont bool + Border Border + Fill Fill + Font Font + NamedStyleIndex *int + func NewStyle() *Style + type WorkBookRels map[string]string + func (w *WorkBookRels) MakeXLSXWorkbookRels() xlsxWorkbookRels + type XLSXReaderError struct + Err string + func (e *XLSXReaderError) Error() string + type XLSXUnmarshaler interface + Unmarshal func(*Row) error