excel

package
v0.0.0-...-4d6acc0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDocument

func NewDocument() document.Document

NewDocument creates a new instance of an Excel document processor.

Types

type Document

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

Document implements the document.Document and document.Spreadsheet interfaces. It uses composition to delegate logic to specialized smaller units.

func (*Document) Close

func (e *Document) Close() error

func (*Document) Export

func (d *Document) Export(uri string) error

func (*Document) GetMetadata

func (e *Document) GetMetadata() (document.Metadata, error)

func (Document) GetSheets

func (e Document) GetSheets() ([]string, error)

func (*Document) Open

func (e *Document) Open(ctx context.Context, reader io.Reader) error

Open loads a document from a reader.

func (*Document) ReadContent

func (e *Document) ReadContent() (string, error)

ReadContent returns the text content of the document.

func (*Document) Replace

func (e *Document) Replace(replacements map[string]string) error

Replace replaces keywords with new values.

func (*Document) Save

func (e *Document) Save(ctx context.Context, writer io.Writer) error

Save writes the document to a writer.

func (*Document) Search

func (e *Document) Search(keywords []string) ([]document.SearchResult, error)

Search finds keywords in the document.

func (*Document) SetContext

func (d *Document) SetContext(ctx context.Context)

func (*Document) SetExportFunc

func (d *Document) SetExportFunc(fn func(doc document.Document, uri string) error)

func (*Document) SetMetadata

func (e *Document) SetMetadata(metadata document.Metadata) error

func (*Document) SetNamedRange

func (d *Document) SetNamedRange(name, ref string) error

func (*Document) SetPassword

func (d *Document) SetPassword(password string) error

func (*Document) Sheet

func (d *Document) Sheet(name string) (document.Sheet, error)

Fluent API: Sheet returns a sheet-scoped handle, auto-creating the sheet if needed.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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