Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( TemplateContentTypes *template.Template TemplateRelationships *template.Template TemplateWorkbook *template.Template TemplateWorkbookRelationships *template.Template TemplateStyles *template.Template TemplateStringLookups *template.Template TemplateSheetStart *template.Template TemplateApp *template.Template TemplateCore *template.Template )
Templates for the various XML content in XLST files
Functions ¶
Types ¶
type DocumentInfo ¶
type DocumentInfo struct { CreatedBy string ModifiedBy string CreatedAt time.Time ModifiedAt time.Time }
XLSX Workbook Document Properties
type Sheet ¶
type Sheet struct { Title string DocumentInfo DocumentInfo // contains filtered or unexported fields }
XLSX Spreadsheet
func NewSheetWithColumns ¶
Create a sheet with dimensions derived from the given columns
func (*Sheet) SaveToFile ¶
Create filename and save the XLSX file
func (*Sheet) SaveToWriter ¶
Save the XLSX file to the given writer
func (*Sheet) SharedStrings ¶
Get the Shared Strings in the order they were added to the map
type SheetWriter ¶
type SheetWriter struct {
// contains filtered or unexported fields
}
Handles the writing of a sheet
func (*SheetWriter) WriteHeader ¶
func (sw *SheetWriter) WriteHeader(s *Sheet) error
Writes the header of a sheet
func (*SheetWriter) WriteRows ¶
func (sw *SheetWriter) WriteRows(rows []Row) error
Write the given rows to this SheetWriter
type WorkbookWriter ¶
type WorkbookWriter struct { // contains filtered or unexported fields }
Handles the writing of an XLSX workbook
func NewWorkbookWriter ¶
func NewWorkbookWriter(w io.Writer) *WorkbookWriter
Creates a new WorkbookWriter
func (*WorkbookWriter) NewSheetWriter ¶
func (ww *WorkbookWriter) NewSheetWriter(s *Sheet) (*SheetWriter, error)
NewSheetWriter creates a new SheetWriter in this workbook using the given sheet. It returns a SheetWriter to which rows can be written. All rows must be written to the SheetWriter before the next call to NewSheetWriter, as this will automatically close the previous SheetWriter.
func (*WorkbookWriter) WriteHeader ¶
func (ww *WorkbookWriter) WriteHeader() error
Write the header files of the workbook