ods

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

View Source
const MaxRowCount = 1 << 20

Variables

View Source
var (
	// FloatType for numerical data
	FloatType = ValueType{'f'}
	// DateType for dates
	DateType = ValueType{'d'}
	// LinkType is a string that seems to be a https?:// link
	LinkType = ValueType{'a'}
	// StringType for everything else
	StringType = ValueType{'s'}
)

Functions

func BeginSpreadsheet

func BeginSpreadsheet() string

func EndSheet

func EndSheet() string

func EndSpreadsheet

func EndSpreadsheet() string

func Manifest

func Manifest() string

func Meta

func Meta() string

func Mimetype

func Mimetype() string

func Row

func Row(values ...interface{}) string

func Settings

func Settings() string

func StreamBeginSpreadsheet

func StreamBeginSpreadsheet(qw422016 *qt422016.Writer)

func StreamEndSheet

func StreamEndSheet(qw422016 *qt422016.Writer)

func StreamEndSpreadsheet

func StreamEndSpreadsheet(qw422016 *qt422016.Writer)

func StreamManifest

func StreamManifest(qw422016 *qt422016.Writer)

func StreamMeta

func StreamMeta(qw422016 *qt422016.Writer)

func StreamMimetype

func StreamMimetype(qw422016 *qt422016.Writer)

func StreamRow

func StreamRow(qw422016 *qt422016.Writer, values ...interface{})

func StreamSettings

func StreamSettings(qw422016 *qt422016.Writer)

func StreamStyles

func StreamStyles(qw422016 *qt422016.Writer, styles map[string]string)

func StreamXML

func StreamXML(qw422016 *qt422016.Writer, s string)

func Styles

func Styles(styles map[string]string) string

func WriteBeginSpreadsheet

func WriteBeginSpreadsheet(qq422016 qtio422016.Writer)

func WriteEndSheet

func WriteEndSheet(qq422016 qtio422016.Writer)

func WriteEndSpreadsheet

func WriteEndSpreadsheet(qq422016 qtio422016.Writer)

func WriteManifest

func WriteManifest(qq422016 qtio422016.Writer)

func WriteMeta

func WriteMeta(qq422016 qtio422016.Writer)

func WriteMimetype

func WriteMimetype(qq422016 qtio422016.Writer)

func WriteRow

func WriteRow(qq422016 qtio422016.Writer, values ...interface{})

func WriteSettings

func WriteSettings(qq422016 qtio422016.Writer)

func WriteStyles

func WriteStyles(qq422016 qtio422016.Writer, styles map[string]string)

func WriteXML

func WriteXML(qq422016 qtio422016.Writer, s string)

func XML

func XML(s string) string

Types

type ODSSheet

type ODSSheet struct {
	Name string
	// contains filtered or unexported fields
}

func (*ODSSheet) AppendRow

func (ods *ODSSheet) AppendRow(values ...interface{}) error

func (*ODSSheet) Close

func (ods *ODSSheet) Close() error

type ODSWriter

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

ODSWriter writes content.xml of ODS zip.

func NewWriter

func NewWriter(w io.Writer) (*ODSWriter, error)

NewWriter returns a content writer and a zip closer for an ods file.

This writer allows concurrent write to separate sheets.

func (*ODSWriter) BeginSheet

func (ow *ODSWriter) BeginSheet(name string, cols []spreadsheet.Column) string

func (*ODSWriter) Close

func (ow *ODSWriter) Close() error

Close the ODSWriter.

func (*ODSWriter) NewSheet

func (ow *ODSWriter) NewSheet(name string, cols []spreadsheet.Column) (spreadsheet.Sheet, error)

func (*ODSWriter) StreamBeginSheet

func (ow *ODSWriter) StreamBeginSheet(qw422016 *qt422016.Writer, name string, cols []spreadsheet.Column)

func (*ODSWriter) WriteBeginSheet

func (ow *ODSWriter) WriteBeginSheet(qq422016 qtio422016.Writer, name string, cols []spreadsheet.Column)

type Style

type Style struct {
	XMLName         xml.Name `xml:"style"`
	Name            string   `xml:"name,attr"`
	Family          string   `xml:"family,attr"`
	MasterPageName  string   `xml:"master-page-name,attr"`
	DataStyleName   string   `xml:"data-style-name,attr"`
	TableProperties struct {
		Display     string `xml:"display,attr"`
		WritingMode string `xml:"writing-mode,attr"`
	} `xml:"table-properties"`
	TextProperties struct {
		FontWeight           string `xml:"font-weight,attr"`
		FontStyle            string `xml:"font-style,attr"`
		TextPosition         string `xml:"text-position,attr"`
		TextLineThroughType  string `xml:"text-line-through-type,attr"`
		TextLineThroughStyle string `xml:"text-line-through-style,attr"`
		TextUnderlineType    string `xml:"text-underline-type,attr"`
		TextUnderlineStyle   string `xml:"text-underline-style,attr"`
		TextUnderlineWidth   string `xml:"text-underline-width,attr"`
		Display              string `xml:"display,attr"`
		TextUnderlineColor   string `xml:"text-underline-color,attr"`
		TextUnderlineMode    string `xml:"text-underline-mode,attr"`
		FontSize             string `xml:"font-size,attr"`
		Color                string `xml:"color,attr"`
		FontFamily           string `xml:"font-family,attr"`
	} `xml:"text-properties"`
	TableRowProperties struct {
		RowHeight           string `xml:"row-height,attr"`
		UseOptimalRowHeight string `xml:"use-optimal-row-height,attr"`
	} `xml:"table-row-properties"`
	TableColumnProperties struct {
		ColumnWidth           string `xml:"column-width,attr"`
		UseOptimalColumnWidth string `xml:"use-optimal-column-width,attr"`
	} `xml:"table-column-properties"`
	TableCellProperties struct {
		BackgroundColor          string `xml:"background-color,attr"`
		BorderTop                string `xml:"border-top,attr"`
		BorderBottom             string `xml:"border-bottom,attr"`
		BorderLeft               string `xml:"border-left,attr"`
		BorderRight              string `xml:"border-right,attr"`
		DiagonalBlTr             string `xml:"diagonal-bl-tr,attr"`
		DiagonalTlBr             string `xml:"diagonal-tl-br,attr"`
		VerticalAlign            string `xml:"vertical-align,attr"`
		WrapOption               string `xml:"wrap-option,attr"`
		ShrinkToFit              string `xml:"shrink-to-fit,attr"`
		WritingMode              string `xml:"writing-mode,attr"`
		GlyphOrientationVertical string `xml:"glyph-orientation-vertical,attr"`
		CellProtect              string `xml:"cell-protect,attr"`
		RotationAlign            string `xml:"rotation-align,attr"`
		RotationAngle            string `xml:"rotation-angle,attr"`
		PrintContent             string `xml:"print-content,attr"`
		DecimalPlaces            string `xml:"decimal-places,attr"`
		TextAlignSource          string `xml:"text-align-source,attr"`
		RepeatContent            string `xml:"repeat-content,attr"`
	} `xml:"table-cell-properties"`
	ParagraphProperties struct {
		WritingModeAutomatic string `xml:"writing-mode-automatic,attr"`
		MarginLeft           string `xml:"margin-left,attr"`
	} `xml:"paragraph-properties"`
}

Style information - generated from content.xml with github.com/miek/zek/cmd/zek.

type ValueType

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

ValueType is the cell's value's type.

func (ValueType) String

func (v ValueType) String() string

Jump to

Keyboard shortcuts

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