Documentation
¶
Overview ¶
Package gofastooxml extracts Word, Excel and PowerPoint files (Office Open XML: .docx, .xlsx, .pptx and their macro and template variants) into the shared go-fast document model, gofastcore.Document.
It uses the standard library and go-fast-core only.
A Word document is one part; a workbook has a part for each sheet and a presentation one for each slide. Headings, list items with their labels, tables with merged cells, pictures, notes and comments are read as what the file declares them to be. Everything the file holds is extracted; where the file declares text not shown (hidden formatting, a hidden sheet, row, column, slide or shape) or drawn with no ink, the block says so (gofastcore.Display). Nothing is judged from appearance; see the README.
Extract and ExtractFile return a whole document. Open returns a File, which reads a part when it is asked for, so that a caller which handles one part and lets it go holds little at a time however large the file is; File.Rows does the same within a sheet too long to hold. The command is in cmd/gofastooxml.
A file encrypted with a password is opened with Options.Password, and one whose key is also encrypted for a certificate with the certificate's private key in Options.Keys; see the README for what is and is not read.
Files are taken to come from people who are not trusted. Nothing in a file is run or followed, every cost a file can impose has a limit (Options.Limits and the fields of Extractor), and every reader stops when its context is cancelled. A file that cannot be read gives one of the shared errors of gofastcore; one that is damaged in part gives what could be read, with warnings. SECURITY.md says what is promised.
Index ¶
- Constants
- func Extract(ctx context.Context, r io.ReaderAt, size int64, opts *gofastcore.Options) (*gofastcore.Document, error)
- func ExtractFile(ctx context.Context, path string, opts *gofastcore.Options) (*gofastcore.Document, error)
- type Extractor
- func (e *Extractor) Extract(ctx context.Context, r io.ReaderAt, size int64, opts *gofastcore.Options) (*gofastcore.Document, error)
- func (e *Extractor) ExtractFile(ctx context.Context, path string, opts *gofastcore.Options) (*gofastcore.Document, error)
- func (e *Extractor) Formats() []string
- func (e *Extractor) Open(path string, opts *gofastcore.Options) (*File, error)
- func (e *Extractor) OpenBytes(data []byte, opts *gofastcore.Options) (*File, error)
- func (e *Extractor) OpenReaderAt(r io.ReaderAt, size int64, opts *gofastcore.Options) (*File, error)
- type File
- func (f *File) Children(ctx context.Context) ([]*gofastcore.Document, error)
- func (f *File) Close() error
- func (f *File) Document(ctx context.Context) (*gofastcore.Document, error)
- func (f *File) Format() string
- func (f *File) Metadata() gofastcore.Metadata
- func (f *File) NumParts() int
- func (f *File) Part(ctx context.Context, number int) (gofastcore.Part, error)
- func (f *File) Parts(ctx context.Context) iter.Seq2[gofastcore.Part, error]
- func (f *File) Rows(ctx context.Context, number, band int) iter.Seq2[gofastcore.Part, error]
- func (f *File) Sheets() []Sheet
- func (f *File) Source() gofastcore.Source
- func (f *File) Warnings() []gofastcore.Warning
- type Sheet
Examples ¶
Constants ¶
const ( // DefaultMaxInputBytes bounds the size of the file. DefaultMaxInputBytes = 1 << 30 // DefaultMaxDecodedBytes bounds the decompressed bytes read from the // archive, over all its parts. It is what stops a decompression bomb. DefaultMaxDecodedBytes = 2 << 30 // DefaultMaxArchiveMembers bounds the number of files in the archive. DefaultMaxArchiveMembers = 100_000 // DefaultMaxCells bounds the cells kept from a workbook, over all its // sheets. Each cell kept costs memory in the result whatever the size // of the file, so this is what bounds the memory a workbook can ask // for. DefaultMaxCells = 20_000_000 // DefaultMaxSpinCount bounds the rounds of hashing an encrypted file // may ask for to turn a password into a key. Office writes 100,000; // the number is the file's to choose, and each round costs time. DefaultMaxSpinCount = 1_000_000 )
Defaults for the limits of gofastcore.Options.Limits, used where a limit is zero. A negative limit means no limit.
const ( // WarnTableFlattened: a table whose declared grid is far larger than // the cells it holds was written as lines of text, cells separated by // tabs, instead of as a table. Raised while a Word document is read. WarnTableFlattened = wml.WarnTableFlattened // WarnIntegrityMismatch: the encrypted file carries a keyed hash of // itself, and the file is not what that hash was made of: it was // changed after it was encrypted, or damaged. What it decrypts to is // extracted all the same. WarnIntegrityMismatch = "ooxml.integrity_mismatch" )
Warning codes specific to this library. Each states a fact about the file. The codes shared by all go-fast libraries are in gofastcore, and this library raises these of them besides the ones about parts, limits and embedded documents:
input.active_content the package contains a VBA project, a sheet of
Excel 4.0 macros, or an action on a slide
that starts a program or runs a macro
input.external_reference a remote template, a linked picture, object
or media clip, a link to another workbook
input.repaired the archive's directory could not be read (the
file is cut short); the members were found
by their own headers, as far as they go
input.ambiguous the archive names a member twice, in two ways,
or has two members with one name; each member
is read under the name in its header, and the
first of two with one name is taken
text.tracked_changes a Word document has tracked changes
input.trailing_data data follows the end of the zip archive; its
text is in the stored part (after_end)
structure.heading_level_clamped
text.control_characters_removed
control characters with no meaning as text
were removed from extracted strings
input.unread_content the document holds content of a kind this
version does not read: a sound or video
clip, an Excel dialog sheet
input.stream_damaged a supporting part (styles, numbering, notes, a
header) or the document properties could not
be read to the end; what was read is used
table.formula_no_value cells hold formulas with no stored result
table.region_split an area of a sheet too thinly filled to be a
table was written a row at a time
input.decrypted the file was encrypted and has been decrypted;
the message names the scheme and what it was
decrypted with (Metadata.Encrypted is set)
const ( // WarnPropertiesDamaged was ooxml.properties_damaged. // // Deprecated: use gofastcore.WarnInputStreamDamaged; the message names // the document properties. WarnPropertiesDamaged = gofastcore.WarnInputStreamDamaged // WarnPropertyTruncated was raised for a property value cut at 64 KiB, // and for custom properties past 256. // // Deprecated: those cuts are now limit.exceeded // (gofastcore.WarnLimitExceeded), severity error, as every other bound // reports what it cuts; this code is no longer raised. WarnPropertyTruncated = "ooxml.property_truncated" // WarnControlCharsRemoved was ooxml.control_characters_removed. // // Deprecated: use gofastcore.WarnTextControlCharactersRemoved. WarnControlCharsRemoved = gofastcore.WarnTextControlCharactersRemoved // WarnUnreadContent was ooxml.unread_content. // // Deprecated: use gofastcore.WarnInputUnreadContent. WarnUnreadContent = gofastcore.WarnInputUnreadContent // WarnPartDamaged was ooxml.part_damaged. // // Deprecated: use gofastcore.WarnInputStreamDamaged. WarnPartDamaged = gofastcore.WarnInputStreamDamaged // WarnFormulaNoValue was ooxml.formula_no_value. // // Deprecated: use gofastcore.WarnTableFormulaNoValue. WarnFormulaNoValue = gofastcore.WarnTableFormulaNoValue // WarnRegionSplit was ooxml.region_split. // // Deprecated: use gofastcore.WarnTableRegionSplit. WarnRegionSplit = gofastcore.WarnTableRegionSplit // WarnDecrypted was ooxml.decrypted. // // Deprecated: use gofastcore.WarnInputDecrypted, or test // Metadata.Encrypted. WarnDecrypted = gofastcore.WarnInputDecrypted )
Names of codes this library raised under its own prefix before go-fast-core v0.1.2 made them shared. Each is now the shared code, so a test such as w.Code == WarnPartDamaged still matches; the code strings in the output changed with them. They will be removed in a later release.
Variables ¶
This section is empty.
Functions ¶
func Extract ¶
func Extract(ctx context.Context, r io.ReaderAt, size int64, opts *gofastcore.Options) (*gofastcore.Document, error)
Extract reads a Word, Excel or PowerPoint file with default settings. It is (&Extractor{}).Extract.
Example ¶
A file that is already in memory, or anything else that can be read at an offset.
data, err := os.ReadFile("testdata/fixtures/tables.docx")
if err != nil {
log.Fatal(err)
}
doc, err := gofastooxml.Extract(context.Background(), bytes.NewReader(data), int64(len(data)), nil)
if err != nil {
log.Fatal(err)
}
for _, b := range doc.Parts[0].Blocks {
if b.Table != nil {
fmt.Printf("a table of %d rows and %d columns, %d merged cells\n", len(b.Table.Rows), len(b.Table.Rows[0]), len(b.Table.Merges))
}
}
Output: a table of 4 rows and 3 columns, 2 merged cells
Example (Display) ¶
What the file declares about the display of its text: here a run formatted as hidden. Text in white or in a one-point font has no reason, since colour and size are not judged, and characters that display as nothing are kept as they are.
doc, err := gofastooxml.ExtractFile(context.Background(), "testdata/fixtures/hidden.docx", nil)
if err != nil {
log.Fatal(err)
}
for _, b := range doc.Parts[0].Blocks {
if b.Display != 0 {
fmt.Printf("%s: %q\n", b.Display, b.Text)
}
}
var shown strings.Builder
doc.WriteText(&shown, &gofastcore.RenderOptions{ExcludeDisplay: gofastcore.DisplayAny})
fmt.Println(strings.Contains(shown.String(), "Hidden by formatting."))
fmt.Println(strings.Contains(doc.Text(), "\U000E0069")) // a Unicode tag character
Output: hidden: "Visible sentence one. Hidden by formatting. Visible sentence two." false true
func ExtractFile ¶
func ExtractFile(ctx context.Context, path string, opts *gofastcore.Options) (*gofastcore.Document, error)
ExtractFile opens the named file and extracts it, with default settings. It is (&Extractor{}).ExtractFile.
Example ¶
The whole of a file as one document.
doc, err := gofastooxml.ExtractFile(context.Background(), "testdata/fixtures/basic-pptx.pptx", nil)
if err != nil {
log.Fatal(err)
}
fmt.Println(doc.Source.Format, "with", len(doc.Parts), "slides")
fmt.Println(doc.Parts[1].Markdown())
Output: pptx with 5 slides # Agenda - Status - Milestones reached - Risks Remember to mention the budget.
Types ¶
type Extractor ¶
type Extractor struct {
// MaxArchiveMembers bounds the number of files in the zip archive.
// Zero means DefaultMaxArchiveMembers; negative means no limit.
MaxArchiveMembers int
// MaxCells bounds the cells kept from a workbook, over all its
// sheets, or from the tables of a presentation, over all its slides.
// A sheet or slide that reaches it is cut off there, with a
// limit.exceeded warning. Zero means DefaultMaxCells; negative means
// no limit.
MaxCells int64
// MaxSpinCount bounds the rounds of hashing a password-protected
// file may ask for when a password is tried. A file that asks for
// more is refused with ErrLimitExceeded. Zero means
// DefaultMaxSpinCount; negative means no limit.
MaxSpinCount int
}
Extractor extracts Word, Excel and PowerPoint files. The zero value is ready to use and safe for concurrent use. Its fields are the settings that only this library has; everything else is in gofastcore.Options.
Example ¶
Settings that only this library has are fields of an Extractor.
e := &gofastooxml.Extractor{MaxCells: 4}
doc, err := e.ExtractFile(context.Background(), "testdata/fixtures/values.xlsx", nil)
if err != nil {
log.Fatal(err)
}
part := doc.Parts[0]
fmt.Println("rows kept:", len(part.Blocks[0].Table.Rows))
for _, w := range part.Warnings {
fmt.Println(w.Code+":", w.Message)
}
Output: rows kept: 1 limit.exceeded: the limit on the number of cells was reached; the sheet is cut off there
func (*Extractor) Extract ¶
func (e *Extractor) Extract(ctx context.Context, r io.ReaderAt, size int64, opts *gofastcore.Options) (*gofastcore.Document, error)
Extract reads size bytes from r and returns the document.
The format is decided from the package itself, never from a file name. An error wraps one of the gofastcore errors:
- ErrMalformed: not a zip archive, or a package too damaged to identify.
- ErrUnsupported: a zip archive or package that is not a Word, Excel or PowerPoint file; a legacy binary Office file; a file encrypted in a way other than with a password or for a certificate.
- ErrPasswordRequired, ErrWrongPassword: the file is encrypted, and Options.Password is empty or does not open it.
- ErrKeyRequired: the file's key is also encrypted for certificates, and no key in Options.Keys is the private key of one of them. The error wraps it beside ErrPasswordRequired or ErrWrongPassword when a password would open the file too.
- ErrLimitExceeded: the input is larger than Limits.MaxInputBytes, or a limit was reached before anything could be read.
- ErrNoPartsSelected: Options.Parts selects none of the document's parts.
It is OpenReaderAt followed by Document.
func (*Extractor) ExtractFile ¶
func (e *Extractor) ExtractFile(ctx context.Context, path string, opts *gofastcore.Options) (*gofastcore.Document, error)
ExtractFile opens the named file and extracts it. The file name is recorded as the document's source name unless opts.Name is set.
func (*Extractor) Formats ¶
Formats lists the formats this library extracts, as they appear in gofastcore.Source.Format. Macro-enabled files and templates are reported as the format they are a variant of.
func (*Extractor) Open ¶
Open opens the named file. The file name is recorded as the source name unless opts.Name is set. Close the File when done with it.
func (*Extractor) OpenBytes ¶
OpenBytes opens a file held in memory. The bytes must not change while the File is in use.
func (*Extractor) OpenReaderAt ¶
func (e *Extractor) OpenReaderAt(r io.ReaderAt, size int64, opts *gofastcore.Options) (*File, error)
OpenReaderAt opens a file of the given size read through r, which must stay readable until the File is closed. The errors are those of Extract.
A password-protected file is opened with Options.Password. Trying a password takes as long as the file's encryption is made to take: a hundredth of a second is usual.
type File ¶
type File struct {
// contains filtered or unexported fields
}
File is a Word, Excel or PowerPoint file opened for reading a part at a time: a Word document's one body, a workbook's sheets, a presentation's slides. Opening a file identifies it and reads its properties and what its parts share; the parts are read when they are asked for, so a caller that handles one part and lets it go holds little at a time however large the file is.
The parts are the same as those in the document that Extract returns, each complete: its warnings are on it, and what the file declares about the display of its text is set (Part.Finish has been called).
A File is safe for concurrent use. A limit of Options.Limits counts over one pass: one call of Document, Part or Children, or one run through Parts or Rows. Passes that run at the same time share it.
func Open ¶
Open opens the named file with default settings. It is (&Extractor{}).Open.
Example ¶
A file opened to be read a part at a time. Each part is complete when it is yielded, and nothing holds on to it afterwards.
f, err := gofastooxml.Open("testdata/fixtures/basic-pptx.pptx", nil)
if err != nil {
log.Fatal(err)
}
defer f.Close()
fmt.Println(f.Format(), f.NumParts())
for part, err := range f.Parts(context.Background()) {
if err != nil {
log.Fatal(err)
}
fmt.Printf("%s %d %q: %d blocks", part.Kind, part.Number, part.Name, len(part.Blocks))
if part.Display != 0 {
fmt.Printf(", %s", part.Display)
}
fmt.Println()
}
Output: pptx 5 slide 1 "Project Update": 2 blocks slide 2 "Agenda": 5 blocks slide 3 "Figures": 3 blocks slide 4 "": 1 blocks, hidden slide 5 "": 2 blocks
func OpenReaderAt ¶
OpenReaderAt opens a file of the given size read through r, with default settings.
func (*File) Children ¶
Children extracts the files embedded in the parts read so far (a workbook in a slide, a document in a document) through Options.Child, and returns them as in gofastcore.Document.Children. With no Options.Child each is listed, not extracted. They have what the parts read last left of the text the document may hold (Limits.MaxTextBytes), as in Document.
func (*File) Document ¶
Document reads the parts Options.Parts selects and returns the document, the same one Extract returns.
func (*File) Format ¶
Format returns the kind of file: "docx", "xlsx" or "pptx". A macro-enabled file or a template is the format it is a variant of.
func (*File) Metadata ¶
func (f *File) Metadata() gofastcore.Metadata
Metadata returns the document's properties.
func (*File) NumParts ¶
NumParts returns the number of parts: 1 for a Word document, the number of sheets of a workbook, the number of slides of a presentation. A workbook or presentation with none has one part, which says so. A document that stores what it shows nowhere (defined names, macro code) has one more, last, of kind gofastcore.PartStored; it comes with the whole document, not with a range of parts.
func (*File) Part ¶
Part reads the part with the given number, from 1, whether or not Options.Parts selects it.
Example ¶
One part by its number.
f, err := gofastooxml.Open("testdata/fixtures/layout.xlsx", nil)
if err != nil {
log.Fatal(err)
}
defer f.Close()
for _, sheet := range f.Sheets() {
fmt.Println(sheet.Number, sheet.Name, sheet.Hidden)
}
part, err := f.Part(context.Background(), 1)
if err != nil {
log.Fatal(err)
}
for _, b := range part.Blocks {
fmt.Println(b.Kind, b.Loc.Range, b.Origin)
}
Output: 1 Data false 2 Secret true 3 Empty false table A1:C4 native table A7:B8 inferred
func (*File) Parts ¶
Parts returns an iterator over the parts Options.Parts selects, in order. Each part is read when the loop reaches it, a few ahead with more than one worker, and is the caller's to keep or let go. The bytes of a picture that several parts show (Options.Images) come with the first of them.
The iterator yields an error, with an empty part, and stops: when no part is selected (gofastcore.ErrNoPartsSelected), when ctx is cancelled, or when the file can no longer be read. A part that is damaged or cut short by a limit is not an error: it is yielded with a warning that says so.
What the parts say about the document as a whole is in Warnings and Children once they have been read.
func (*File) Rows ¶
Rows returns an iterator over the cells of a sheet of a workbook, a band of rows at a time. number is the sheet's part number, from 1, and band the number of rows that have cells to a band. Each band is yielded as a part with the sheet's kind, number and name, holding the tables its cells make, with what the file declares about the display of cells as in the sheet read whole.
It is for sheets too long to hold: what is held at a time is one band, whatever the length of the sheet, and the limits on cells and text do not apply. In exchange the sheet's part is read twice; a table that runs past the end of a band is cut there, and goes on in the next band as a table marked Continued; the tables a sheet declares are not looked up, so every table is origin inferred; and comments, shapes and pictures are not read (Part reads them). A sheet with no cells yields one part with no blocks.
Bands follow the order of the rows in the file, which in a sound workbook is the order of the sheet. Rows a file gives out of order are put in order within a band and not across bands, and a cell a damaged file gives twice, which the sheet read whole has once, is in each band it falls in.
With more than one worker (Options.Workers) the sheet is decompressed on a goroutine of its own, a few chunks ahead of the reading of its rows; the bands are the same as with one.
The iterator yields an error and stops as Parts does; for a file that is not a workbook the error wraps gofastcore.ErrUnsupported.
Example ¶
A sheet too long to hold, a band of rows at a time.
f, err := gofastooxml.Open("testdata/fixtures/values.xlsx", nil)
if err != nil {
log.Fatal(err)
}
defer f.Close()
rows := 0
for band, err := range f.Rows(context.Background(), 1, 8) {
if err != nil {
log.Fatal(err)
}
for _, b := range band.Blocks {
rows += len(b.Table.Rows)
fmt.Println(b.Loc.Range, b.Table.Rows[0])
}
}
fmt.Println(rows, "rows")
Output: A1:C8 [Kind Value Format] A9:C16 [percent 12.5% 0.0%] A17:C18 [boolean TRUE General] 18 rows
func (*File) Sheets ¶
Sheets lists the sheets of a workbook in order, without reading them. It is empty for other formats.
func (*File) Source ¶
func (f *File) Source() gofastcore.Source
Source returns what is known of where the document came from, as in gofastcore.Document.Source.
func (*File) Warnings ¶
func (f *File) Warnings() []gofastcore.Warning
Warnings returns the warnings about the document as a whole, as in gofastcore.Document.Warnings: those known when the file was opened, and those that the parts read so far give rise to (content of a kind that is not read, damaged supporting parts, references to things outside the file). It is complete once every part has been read.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
gofastooxml
command
Command gofastooxml extracts Word, Excel and PowerPoint files into the shared document model of the go-fast libraries and prints them as JSON, Markdown or plain text.
|
Command gofastooxml extracts Word, Excel and PowerPoint files into the shared document model of the go-fast libraries and prints them as JSON, Markdown or plain text. |
|
internal
|
|
|
cfb
Package cfb reads compound files: the container of the legacy Office formats, and of a password-protected Office Open XML file, which is an encrypted zip archive stored as a stream inside one.
|
Package cfb reads compound files: the container of the legacy Office formats, and of a password-protected Office Open XML file, which is an encrypted zip archive stored as a stream inside one. |
|
chart
Package chart reads a chart part: the classic charts of DrawingML (c:) and the kinds Office added in 2016 (cx:), as Word, Excel and PowerPoint all store them.
|
Package chart reads a chart part: the classic charts of DrawingML (c:) and the kinds Office added in 2016 (cx:), as Word, Excel and PowerPoint all store them. |
|
clean
Package clean turns bytes read from a file into strings that obey the text conventions of the shared document model: valid UTF-8, no control characters other than line feed and tab, and for prose no surrounding white space and no presentation-form ligatures.
|
Package clean turns bytes read from a file into strings that obey the text conventions of the shared document model: valid UTF-8, no control characters other than line feed and tab, and for prose no surrounding white space and no presentation-form ligatures. |
|
codepage
Package codepage decodes text in the code pages of Windows (874, 932, 936, 949, 950, 1250 to 1258) and Mac Roman (10000), from Microsoft's tables of them (see generate.py).
|
Package codepage decodes text in the code pages of Windows (874, 932, 936, 949, 950, 1250 to 1258) and Mac Roman (10000), from Microsoft's tables of them (see generate.py). |
|
crypt
Package crypt opens password-protected Office Open XML files.
|
Package crypt opens password-protected Office Open XML files. |
|
diagram
Package diagram reads a SmartArt diagram: the text of its data model, in the order and nesting the model declares, and, where the file carries the drawing Office made of it, where each piece of text is drawn and what the drawing declares about its display.
|
Package diagram reads a SmartArt diagram: the text of its data model, in the order and nesting the model declares, and, where the file carries the drawing Office made of it, where each piece of text is drawn and what the drawing declares about its display. |
|
dml
Package dml reads DrawingML, the part of Office Open XML that Word, Excel and PowerPoint share for what is drawn: colours and fills, where a shape lies, and the text inside shapes.
|
Package dml reads DrawingML, the part of Office Open XML that Word, Excel and PowerPoint share for what is drawn: colours and fills, where a shape lies, and the text inside shapes. |
|
formula
Package formula moves the references of a spreadsheet formula.
|
Package formula moves the references of a spreadsheet formula. |
|
hidden
Package hidden has what the readers of the three formats share in placing what the file declares about the display of text (hidden, no ink) on blocks and spans.
|
Package hidden has what the readers of the three formats share in placing what the file declares about the display of text (hidden, no ink) on blocks and spans. |
|
label
Package label writes the labels a reader sees in front of list items: bullets, and numbers in the forms Word and PowerPoint both use.
|
Package label writes the labels a reader sees in front of list items: bullets, and numbers in the forms Word and PowerPoint both use. |
|
media
Package media reads what a document carries besides its text: pictures and embedded files.
|
Package media reads what a document carries besides its text: pictures and embedded files. |
|
ns
Package ns numbers the XML namespaces and names the relationship types of Office Open XML, in both forms a file may use: Transitional, which Office writes by default, and ISO Strict.
|
Package ns numbers the XML namespaces and names the relationship types of Office Open XML, in both forms a file may use: Transitional, which Office writes by default, and ISO Strict. |
|
numfmt
Package numfmt renders a spreadsheet cell's value the way the cell shows it: through its number format.
|
Package numfmt renders a spreadsheet cell's value the way the cell shows it: through its number format. |
|
omml
Package omml writes Office Math (OMML), the equations of Word and PowerPoint, in UnicodeMath: the linear form Word itself shows when an equation is switched to "linear" (Unicode Technical Note 28).
|
Package omml writes Office Math (OMML), the equations of Word and PowerPoint, in UnicodeMath: the linear form Word itself shows when an equation is switched to "linear" (Unicode Technical Note 28). |
|
ooxmltest
Package ooxmltest is the test harness of go-fast-ooxml: an in-memory builder for Office Open XML packages, scorers, oracle wrappers, the corpus manifest and the checks every extracted document must pass.
|
Package ooxmltest is the test harness of go-fast-ooxml: an in-memory builder for Office Open XML packages, scorers, oracle wrappers, the corpus manifest and the checks every extracted document must pass. |
|
opc
Package opc reads the container of an Office Open XML file: a zip archive holding parts, a table of their content types, and relationship parts that link them.
|
Package opc reads the container of an Office Open XML file: a zip archive holding parts, a table of their content types, and relationship parts that link them. |
|
pml
Package pml reads PowerPoint presentations (PresentationML) into the shared document model: one part per slide, with what each shape says as headings, paragraphs, list items, tables and pictures, each with the place on the slide it was read from.
|
Package pml reads PowerPoint presentations (PresentationML) into the shared document model: one part per slide, with what each shape says as headings, paragraphs, list items, tables and pictures, each with the place on the slide it was read from. |
|
props
Package props reads the document properties of an Office Open XML package into the shared model's Metadata.
|
Package props reads the document properties of an Office Open XML package into the shared model's Metadata. |
|
sml
Package sml reads Excel workbooks (SpreadsheetML) into the shared document model: one part per sheet, the cells as tables, with what each cell displays rather than what it stores.
|
Package sml reads Excel workbooks (SpreadsheetML) into the shared document model: one part per sheet, the cells as tables, with what each cell displays rather than what it stores. |
|
stored
Package stored reads what an Office package of any of the three formats keeps for the file as a whole and shows on no page: the code of its VBA project, and its custom XML data.
|
Package stored reads what an Office package of any of the three formats keeps for the file as a whole and shows on no page: the code of its VBA project, and its custom XML data. |
|
symbol
Package symbol translates the characters of symbol fonts to Unicode.
|
Package symbol translates the characters of symbol fonts to Unicode. |
|
theme
Package theme reads the colour scheme of an Office theme, which Word, Excel and PowerPoint files all refer to: a file names a colour as "accent1" or as theme colour 4, and the theme part says what that is.
|
Package theme reads the colour scheme of an Office theme, which Word, Excel and PowerPoint files all refer to: a file names a colour as "accent1" or as theme colour 4, and the theme part says what that is. |
|
unit
Package unit is what the readers of the three formats have in common when a document is read a part at a time: a Word document's one body, a workbook's sheets, a presentation's slides.
|
Package unit is what the readers of the three formats have in common when a document is read a part at a time: a Word document's one body, a workbook's sheets, a presentation's slides. |
|
vba
Package vba reads the source code of a VBA project: the modules of macros a macro-enabled Office file carries in its vbaProject.bin, a compound file.
|
Package vba reads the source code of a VBA project: the modules of macros a macro-enabled Office file carries in its vbaProject.bin, a compound file. |
|
warn
Package warn holds the warning codes this library raises beyond the ones every go-fast library shares (those are in gofastcore).
|
Package warn holds the warning codes this library raises beyond the ones every go-fast library shares (those are in gofastcore). |
|
wml
Package wml reads WordprocessingML, the format of Word documents, into the blocks of the shared document model.
|
Package wml reads WordprocessingML, the format of Word documents, into the blocks of the shared document model. |
|
xlsb
Package xlsb reads the parts of an Excel binary workbook (.xlsb, [MS-XLSB]): the same package as an .xlsx file, whose workbook, sheets, shared strings, styles, comments and tables are records in place of XML.
|
Package xlsb reads the parts of an Excel binary workbook (.xlsb, [MS-XLSB]): the same package as an .xlsx file, whose workbook, sheets, shared strings, styles, comments and tables are records in place of XML. |
|
xmlscan
Package xmlscan is a pull tokenizer for XML, built for reading Office Open XML parts quickly and safely.
|
Package xmlscan is a pull tokenizer for XML, built for reading Office Open XML parts quickly and safely. |