Documentation ¶
Overview ¶
Package format contains format handling types. Each ooxml format that can be handled by the library has its own type plus there is a generic XML-handling type that forms the basis for the operations on ooxml files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Docx ¶
type Docx struct { Text string Links []string Footnotes []string Headers []string // contains filtered or unexported fields }
Docx handles docx documents. Its fields contain the textual information corresponding to the different elements of the document: Text contains the document text, Links is a list of links that appear in the document (the text part contains references to the links), Footnotes contains the list of footnotes, and Headers and Footers are also lists and contain the headers and footers of the document.
func MakeDocx ¶
MakeDocx creates a Docx that parses the document given by its path. The returned instance contains the valid contents of the document if there was no error while processing it. If there was an error, it is reported in the returned error value).
func MakeDocxFromUrl ¶ added in v1.0.4
MakeDocxFromUrl creates a Docx that parses the document given by an URL. The returned instance contains the valid contents of the document if there was no error while processing it. If there was an error, it is reported in the returned error value).
type Pptx ¶
Pptx handles pptx documents. The Text member is a list of strings where each element corresponds to a slide in the presentation.
func MakePptx ¶
MakePptx creates a Pptx from the path to a presentation. The returned instance contains the valid contents of the document if there was no error while processing it (which is then reported in the returned error value).
func MakePptxFromUrl ¶ added in v1.0.4
MakePptxFromUrl creates a Pptx from an URL to a presentation. The returned instance contains the valid contents of the document if there was no error while processing it (which is then reported in the returned error value).
type Xlsx ¶
Xlsx handles xlsx documents. The Text member is a list of strings where each element corresponds to a string value in the document. Only the strings are collected, numbers, formulas and binary data is ignored. Only unique strings are collected, i.e. if a piece of text appears multiple times in the document, it will only show up once in the list.
func MakeXlsx ¶
MakeXlsx creates a Xlsx from the path to a spreadsheet document. The returned instance contains the valid contents of the document if there was no error while processing it (which is then reported in the returned error value).
func MakeXlsxFromUrl ¶ added in v1.0.4
MakeXlsxFromUrl creates a Xlsx from an URL to a spreadsheet document. The returned instance contains the valid contents of the document if there was no error while processing it (which is then reported in the returned error value).