xlsx

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package xlsx is an Extractor for Excel .xlsx files. A .xlsx is a zip of OOXML SpreadsheetML parts; most cell text lives in a shared-string table (xl/sharedStrings.xml) referenced by cells in xl/worksheets/*.xml. This extractor resolves those references and emits one line per row (cells tab-joined) so row context — e.g. an item ID beside its status — survives for retrieval. Each sheet's rows are introduced by its workbook tab name (see domain.SheetHeadingPrefix), so a retrieved row can say which table it came from. Formatting, formulas, and merged-cell geometry are not preserved. Stdlib only.

Index

Constants

View Source
const ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"

ContentType is the OOXML SpreadsheetML media type for .xlsx files.

Variables

This section is empty.

Functions

This section is empty.

Types

type Extractor

type Extractor struct{}

Extractor extracts plain text from .xlsx content. Its zero value is ready.

func New

func New() Extractor

New returns an xlsx Extractor.

func (Extractor) Extract

func (e Extractor) Extract(contentType string, raw []byte) (string, error)

Extract returns the workbook's text: each sheet's rows, one row per line with cells tab-separated, sheets separated by a blank line.

func (Extractor) Supports

func (Extractor) Supports(contentType string) bool

Supports reports whether the content type is an .xlsx workbook.

Jump to

Keyboard shortcuts

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