excel

package
v0.0.0-...-c864ae1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 13, 2023 License: BSD-2-Clause, BSD-3-Clause, MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActivateFirstWorksheet

func ActivateFirstWorksheet(workbook Workbook)

func AddCsvFileContentToWorksheet

func AddCsvFileContentToWorksheet(csvFilePath string, worksheet Worksheet)

func AutoFitColumns

func AutoFitColumns(worksheet Worksheet)

func ClearUsedRange

func ClearUsedRange(worksheet Worksheet)

func ColumnCount

func ColumnCount(worksheet Worksheet) uint

func DisableSpreadsheetSafeties

func DisableSpreadsheetSafeties()

func EnableSpreadsheetSafeties

func EnableSpreadsheetSafeties() error

func MoveWorksheetToLastInWorksheets

func MoveWorksheetToLastInWorksheets(worksheet Worksheet, worksheets Worksheets)

func RowCount

func RowCount(worksheet Worksheet) uint

Types

type Cell

type Cell interface {
	Value() interface{}
	SetValue(value interface{})
	SetNumberFormat(value interface{})
	Release()
}

type CellImpl

type CellImpl struct {
	// contains filtered or unexported fields
}

func (*CellImpl) Release

func (ep *CellImpl) Release()

func (*CellImpl) SetNumberFormat

func (cell *CellImpl) SetNumberFormat(value interface{})

func (*CellImpl) SetValue

func (cell *CellImpl) SetValue(value interface{})

func (*CellImpl) Value

func (cell *CellImpl) Value() interface{}

func (*CellImpl) WithDispatch

func (cell *CellImpl) WithDispatch(dispatch *ole.IDispatch) *CellImpl

type Excel

type Excel struct {
	// contains filtered or unexported fields
}

func (*Excel) Release

func (ep *Excel) Release()

func (*Excel) WithDispatch

func (excel *Excel) WithDispatch(dispatch *ole.IDispatch) *Excel

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func (*Handler) Destroy

func (handler *Handler) Destroy()

func (*Handler) Initialise

func (handler *Handler) Initialise() *Handler

func (*Handler) Workbooks

func (handler *Handler) Workbooks() Workbooks

type QueryTable

type QueryTable interface {
	SetProperty(propertyName string, propertyValue interface{})
	Release()
}

type QueryTableImpl

type QueryTableImpl struct {
	// contains filtered or unexported fields
}

func (*QueryTableImpl) Release

func (ep *QueryTableImpl) Release()

func (*QueryTableImpl) SetProperty

func (qt *QueryTableImpl) SetProperty(propertyName string, propertyValue interface{})

func (*QueryTableImpl) WithDispatch

func (qt *QueryTableImpl) WithDispatch(dispatch *ole.IDispatch) *QueryTableImpl

type QueryTables

type QueryTables interface {
	AddCsvFileToWorksheet(csvFilePath string, worksheet Worksheet) QueryTable
	Release()
}

type QueryTablesImpl

type QueryTablesImpl struct {
	// contains filtered or unexported fields
}

func (*QueryTablesImpl) AddCsvFileToWorksheet

func (qt *QueryTablesImpl) AddCsvFileToWorksheet(csvFilePath string, worksheet Worksheet) QueryTable

func (*QueryTablesImpl) Release

func (ep *QueryTablesImpl) Release()

func (*QueryTablesImpl) WithDispatch

func (qt *QueryTablesImpl) WithDispatch(dispatch *ole.IDispatch) *QueryTablesImpl

type Range

type Range interface {
	Rows() Range
	Columns() Range
	Count() uint
	Clear()
	AutoFit()
	Release()
}

type RangeImpl

type RangeImpl struct {
	// contains filtered or unexported fields
}

func (*RangeImpl) AutoFit

func (r *RangeImpl) AutoFit()

func (*RangeImpl) Clear

func (r *RangeImpl) Clear()

func (*RangeImpl) Columns

func (r *RangeImpl) Columns() Range

func (*RangeImpl) Count

func (r *RangeImpl) Count() uint

func (*RangeImpl) Release

func (r *RangeImpl) Release()

func (*RangeImpl) Rows

func (r *RangeImpl) Rows() Range

func (*RangeImpl) WithDispatch

func (r *RangeImpl) WithDispatch(dispatch *ole.IDispatch) *RangeImpl

type Workbook

type Workbook interface {
	Worksheets() (worksheets Worksheets)
	Worksheet(index uint) Worksheet
	WorksheetNamed(name string) Worksheet
	Save()
	SaveAs(newFileName string)
	Close(args ...interface{})
	SetProperty(propertyName string, propertyValue interface{})
	Release()
}

type WorkbookImpl

type WorkbookImpl struct {
	// contains filtered or unexported fields
}

func (*WorkbookImpl) Close

func (wb *WorkbookImpl) Close(parameters ...interface{})

func (*WorkbookImpl) Release

func (ep *WorkbookImpl) Release()

func (*WorkbookImpl) Save

func (wb *WorkbookImpl) Save()

func (*WorkbookImpl) SaveAs

func (wb *WorkbookImpl) SaveAs(newFileName string)

func (*WorkbookImpl) SetProperty

func (wb *WorkbookImpl) SetProperty(propertyName string, propertyValue interface{})

func (*WorkbookImpl) WithDispatch

func (wb *WorkbookImpl) WithDispatch(dispatch *ole.IDispatch) *WorkbookImpl

func (*WorkbookImpl) Worksheet

func (wb *WorkbookImpl) Worksheet(index uint) Worksheet

func (*WorkbookImpl) WorksheetNamed

func (wb *WorkbookImpl) WorksheetNamed(name string) Worksheet

func (*WorkbookImpl) Worksheets

func (wb *WorkbookImpl) Worksheets() (worksheets Worksheets)

type Workbooks

type Workbooks interface {
	Add() (workbook Workbook)
	Open(filePath string) (workbook Workbook)
	Close()
	Count() uint
	Release()
}

type WorkbooksImpl

type WorkbooksImpl struct {
	// contains filtered or unexported fields
}

func (*WorkbooksImpl) Add

func (books *WorkbooksImpl) Add() (workbook Workbook)

func (*WorkbooksImpl) Close

func (books *WorkbooksImpl) Close()

func (*WorkbooksImpl) Count

func (books *WorkbooksImpl) Count() uint

func (*WorkbooksImpl) Open

func (books *WorkbooksImpl) Open(filePath string) (workbook Workbook)

func (*WorkbooksImpl) Release

func (ep *WorkbooksImpl) Release()

func (*WorkbooksImpl) WithDispatch

func (books *WorkbooksImpl) WithDispatch(dispatch *ole.IDispatch) *WorkbooksImpl

type Worksheet

type Worksheet interface {
	Name() string
	SetName(name string)
	Delete()
	UsedRange() Range
	Cells(rowIndex uint, columnIndex uint) (cell Cell)
	QueryTables() QueryTables
	MoveToAfterWorksheet(worksheet Worksheet)
	Activate()
	Release()
}

func AddWorksheetFromCsvFileToWorkbook

func AddWorksheetFromCsvFileToWorkbook(csvFilePath string, worksheetName string, workbook Workbook) Worksheet

func LastOfWorksheets

func LastOfWorksheets(worksheets Worksheets) (worksheet Worksheet)

type WorksheetImpl

type WorksheetImpl struct {
	// contains filtered or unexported fields
}

func (*WorksheetImpl) Activate

func (ws *WorksheetImpl) Activate()

func (*WorksheetImpl) Cells

func (ws *WorksheetImpl) Cells(rowIndex uint, columnIndex uint) (cell Cell)

func (*WorksheetImpl) Delete

func (ws *WorksheetImpl) Delete()

func (*WorksheetImpl) MoveToAfterWorksheet

func (ws *WorksheetImpl) MoveToAfterWorksheet(worksheet Worksheet)

func (*WorksheetImpl) Name

func (ws *WorksheetImpl) Name() string

func (*WorksheetImpl) QueryTables

func (ws *WorksheetImpl) QueryTables() QueryTables

func (*WorksheetImpl) Release

func (ws *WorksheetImpl) Release()

func (*WorksheetImpl) SetName

func (ws *WorksheetImpl) SetName(name string)

func (*WorksheetImpl) UsedRange

func (ws *WorksheetImpl) UsedRange() Range

func (*WorksheetImpl) WithDispatch

func (ws *WorksheetImpl) WithDispatch(dispatch *ole.IDispatch) *WorksheetImpl

type Worksheets

type Worksheets interface {
	Add() (worksheet Worksheet)
	Count() uint
	Item(index uint) Worksheet
	Release()
}

type WorksheetsImpl

type WorksheetsImpl struct {
	// contains filtered or unexported fields
}

func (*WorksheetsImpl) Add

func (sheets *WorksheetsImpl) Add() (worksheet Worksheet)

func (*WorksheetsImpl) Count

func (sheets *WorksheetsImpl) Count() uint

func (*WorksheetsImpl) Item

func (sheets *WorksheetsImpl) Item(index uint) Worksheet

func (*WorksheetsImpl) Release

func (sheets *WorksheetsImpl) Release()

func (*WorksheetsImpl) WithDispatch

func (sheets *WorksheetsImpl) WithDispatch(dispatch *ole.IDispatch) *WorksheetsImpl

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL