excelparser

package module
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: MIT Imports: 6 Imported by: 0

README

excelParser

A minimalistic excel parser

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Extract added in v1.0.4

func Extract(xlsxFile *zip.ReadCloser, sheetName string) (map[string][]string, error)

func Read added in v1.0.3

func Read(fileName string) (zip.ReadCloser, error)

Types

type Cell

type Cell struct {
	R string `xml:"r,attr"`
	T string `xml:"t,attr,omitempty"`
	V string `xml:"v"`
}

type Col

type Col struct {
	Min   int    `xml:"min,attr"`
	Max   int    `xml:"max,attr"`
	Width int    `xml:"width,attr"`
	Span  string `xml:"span,attr"`
}

type Row

type Row struct {
	R     int    `xml:"r,attr"`
	Spans string `xml:"spans,attr"`
	Cells []Cell `xml:"c"`
}

type SI

type SI struct {
	T string `xml:"t"`
}

SI represents the shared string item.

type SharedStrings

type SharedStrings struct {
	XMLName      xml.Name `xml:"http://schemas.openxmlformats.org/spreadsheetml/2006/main sst"`
	Count        int      `xml:"count,attr"`
	UniqueCount  int      `xml:"uniqueCount,attr"`
	SharedString []SI     `xml:"si"`
}

SharedStrings represents the structure of the shared strings XML.

type Worksheet

type Worksheet struct {
	XMLName   xml.Name `xml:"http://schemas.openxmlformats.org/spreadsheetml/2006/main worksheet"`
	ColWidths []Col    `xml:"cols>col"`
	Rows      []Row    `xml:"sheetData>row"`
}

Jump to

Keyboard shortcuts

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