Pure go library for creating and processing Office Word (.docx), Excel (.xlsx) and Powerpoint (.pptx) documents

Overview

unioffice is a library for creation of Office Open XML documents (.docx, .xlsx and .pptx). Its goal is to be the most compatible and highest performance Go library for creation and editing of docx/xlsx/pptx files.

Build Status GitHub (pre-)release License: UniDoc EULA GoDoc

https://github.com/unidoc/unioffice/

Status

  • Documents (docx) [Word]
    • Read/Write/Edit
    • Formatting
    • Images
    • Tables
  • Spreadsheets (xlsx) [Excel]
    • Read/Write/Edit
    • Cell formatting including conditional formatting
    • Cell validation (drop down combobox, rules, etc.)
    • Retrieve cell values as formatted by Excel (e.g. retrieve a date or number as displayed in Excel)
    • Formula Evaluation (100+ functions supported currently, more will be added as required)
    • Embedded Images
    • All chart types
  • PowerPoint (pptx) [PowerPoint]
    • Creation from templates
    • Textboxes/shapes

Performance

There has been a great deal of interest in performance numbers for spreadsheet creation/reading lately, so here are unioffice numbers for this benchmark which creates a sheet with 30k rows, each with 100 columns.

creating 30000 rows * 100 cells took 3.92506863s
saving took 89ns
reading took 9.522383048s

Creation is fairly fast, saving is very quick due to no reflection usage, and reading is a bit slower. The downside is that the binary is large (33MB) as it contains generated structs, serialization and deserialization code for all of DOCX/XLSX/PPTX.

Installation

go get github.com/unidoc/unioffice/

Document Examples

Spreadsheet Examples

Presentation Examples

Raw Types

The OOXML specification is large and creating a friendly API to cover the entire specification is a very time consuming endeavor. This library attempts to provide an easy to use API for common use cases in creating OOXML documents while allowing users to fall back to raw document manipulation should the library's API not cover a specific use case.

The raw XML based types reside in the schema/ directory. These types are accessible from the wrapper types via a X() method that returns the raw type.

For example, the library currently doesn't have an API for setting a document background color. However it's easy to do manually via editing the CT_Background element of the document.

dox := document.New()
doc.X().Background = wordprocessingml.NewCT_Background()
doc.X().Background.ColorAttr = &wordprocessingml.ST_HexColor{}
doc.X().Background.ColorAttr.ST_HexColorRGB = color.RGB(50, 50, 50).AsRGBString()

Contribution guidelines

CLA assistant

All contributors are must sign a contributor license agreement before their code will be reviewed and merged.

Licensing

This software package (unioffice) is a commercial product and requires a license code to operate.

The use of this software package is governed by the end-user license agreement (EULA) available at: https://unidoc.io/eula/

To obtain a Trial license code to evaluate the software, please visit https://unidoc.io/

Issues
  • Some Bugs In Windows

    Some Bugs In Windows

    Description

    Hi,author. First of all,I love this lib,and my english is not good.If I used the wrong words, please forgive me. When I watching your example, I was so exciting.But after I run your example's code.The worry is appear.Open the generate file,the windows tell me, can open this file.

    Expected Behavior

    Actual Behavior

    Please include a reproducible code snippet or document attachment that demonstrates the issue.

    opened by siskinc 14
  • Unsupported purl.oclc.org (strict ooxml namespace)

    Unsupported purl.oclc.org (strict ooxml namespace)

    Description

    I'm hitting a weird issue when updating FldChar's. I need to replace the default text in some form fields. If I mark the fields as dirty or set SetUpdateFieldsOnOpen(true) and then select to update the entire table as prompted when the document opens, saving the result makes it unusable by gooxml. I get the following warnings and doc.X().Body is nil:

    2019/02/19 16:34:16 unsupported relationship type: http://purl.oclc.org/ooxml/officeDocument/relationships/officeDocument tgt: word/document.xml
    2019/02/19 16:34:16 unsupported relationship type: http://purl.oclc.org/ooxml/officeDocument/relationships/extendedProperties tgt: docProps/app.xml
    

    Digging through the raw XML, it doesn't look like an issue with the actual FldChar's that are being altered, it looks like an issue with the document namespacing. For some reason, after updating the form fields, some of the http://schemas.openxmlformats.org/officeDocument/2006/... attributes get replaced with http://purl.oclc.org/ooxml/officeDocument/....

    I don't know enough about the spec to know why these would change. But the resulting document opens just fine with Word. It is only gooxml that has an issue.

    I tried this with and without the presence of a table of contents. When the table of contents isn't present, there is no issue. When the table of contents is present, and you select "update entire table", then you experience the problem after saving the document.

    Expected Behavior

    Handle documents using purl.oclc.org namespacing appropriately.

    Actual Behavior

    Documents with purl.oclc.org namespacing have a nil Body.

    I've attached before and after documents. The actual FldChar changes appear starting on page 11 (a result of re-using code that originally produced the issue). If you need the code making the changes or simplified before/after documents, just let me know.

    after.docx before.docx

    opened by freb 13
  • recompile the example and cannot open the generate .docx

    recompile the example and cannot open the generate .docx

    experimental environment: 1.OS:windows 7 x64、VScode 2.Go version 1.9 first,i use "go get baliance.com/gooxml",after that,i use "go build baliance.com/gooxml/..."but the compiler error:"The filename or extension is too long." so i rename the"schemas.openxmlformats.org" to "s" and change all the "schemas.openxmlformats.org" to "s" of the path in all files. finally,it compiles successfully. i test the file in "_examples/document/tables/main.go" ------go run main.go--- ------success----(maybe success,no error and generate the" tables.docx" file)------ ------cannot open the tables.docx------ so i test other examples,they all generate the .docx but cannot open with "MS Office "

    cheers,looking for your replay.

    opened by thxallvu 12
  • Support adding/replacing MERGEFIELDs

    Support adding/replacing MERGEFIELDs

    I'm trying to understand if/how 'MERGEFIELDS' are supported within gooxml, or if it is the kind of thing I would need to drop into .X() to handle?

    I did see that there are doc.FormFields(), r.AddField(), etc functions, but as best I could tell, these didn't seem to do what I want. I also came across the 'KnownFields', which seems to correlate with this, but couldn't tell if it was associated to some deeper support/code:

    • https://github.com/baliance/gooxml/blob/master/document/knownfields.go

    Essentially, is there a way to create, read, edit/update, etc these elements in a gooxml native way currently? And if not, do you have any suggestions of the best way to interact with them?

    Below is a snippet from a document that uses these fields:

    <w:p w14:paraId="1566BC4D" w14:textId="3B6A9F12" w:rsidR="006D368D" w:rsidRPr="00497636" w:rsidRDefault="000E0283">
            <w:pPr>
                <w:rPr>
                    <w:lang w:val="en-AU"/>
                </w:rPr>
            </w:pPr>
            <w:r>
                <w:rPr>
                    <w:lang w:val="en-AU"/>
                </w:rPr>
                <w:t>Merge Field:</w:t>
            </w:r>
            <w:r w:rsidR="006D368D">
                <w:rPr>
                    <w:lang w:val="en-AU"/>
                </w:rPr>
                <w:t xml:space="preserve">
                </w:t>
            </w:r>
            <w:r w:rsidRPr="00497636">
                <w:rPr>
                    <w:lang w:val="en-AU"/>
                </w:rPr>
                <w:fldChar w:fldCharType="begin"/>
            </w:r>
            <w:r w:rsidRPr="00497636">
                <w:rPr>
                    <w:lang w:val="en-AU"/>
                </w:rPr>
                <w:instrText xml:space="preserve"> MERGEFIELD  $Foo.Bar  \* MERGEFORMAT </w:instrText>
            </w:r>
            <w:r w:rsidRPr="00497636">
                <w:rPr>
                    <w:lang w:val="en-AU"/>
                </w:rPr>
                <w:fldChar w:fldCharType="separate"/>
            </w:r>
            <w:r w:rsidRPr="00497636">
                <w:rPr>
                    <w:lang w:val="en-AU"/>
                </w:rPr>
                <w:t>«$Foo.Bar»</w:t>
            </w:r>
            <w:r w:rsidRPr="00497636">
                <w:rPr>
                    <w:lang w:val="en-AU"/>
                </w:rPr>
                <w:fldChar w:fldCharType="end"/>
            </w:r>
        </w:p>
    

    Refs:

    • https://github.com/baliance/gooxml/blob/master/document/knownfields.go
    • http://officeopenxml.com/WPfields.php
    • http://officeopenxml.com/WPfieldInstructions.php
    • http://officeopenxml.com/WPgeneralFieldSwitches.php
    opened by 0xdevalias 12
  • add the ability to utilize footnotes and endnotes in documents

    add the ability to utilize footnotes and endnotes in documents

    Added:

    • Basic CRUD functions to handle both endnotes and footnotes
    • Tester functions in convention of the library (e.g., HasFootnotes or IsFootnote)
    • Tests to cover the added functionality.

    This change is Reviewable

    opened by compleatang 9
  • [Question] Handling excel data

    [Question] Handling excel data

    As far as i saw, there is no way to get the data from an excel file as a matrix when running row by row. unioffice removes empty cols in a row.

    Is there any way to get the whole data of an excel, even with empty cols?

    opened by polderudo 9
  • Bug in RunProperties.IsBold()

    Bug in RunProperties.IsBold()

    This is the method code:

    func (r RunProperties) IsBold() bool {
    	return r.x.B != nil
    }
    

    It works in most cases, since a non-bold run's properties look like this:

                B: (*wml.CT_OnOff)(<nil>),
    

    And a bold run's properties look like this:

                    B: (*wml.CT_OnOff)(0xc42000e450)({
                     ValAttr: (*sharedTypes.ST_OnOff)(<nil>)
                    }),
    

    However, if the style uses bold by default, and a run turns it off, then B will look like this:

                    B: (*wml.CT_OnOff)(0xc42000e3a0)({
                     ValAttr: (*sharedTypes.ST_OnOff)(0xc420011d80)(false)
                    })
    

    Therefore, IsBold() would falsely say that the run is bold.

    This seems to map directly from XML where <w:b/> is short for <w:b val="true"/>, and turning bold off requires <w:b val="false"/>.

    Actually I can't say what the proper behaviour should be, because a boolean is not enough to express the three possible states:

    • No change to boldness
    • Turn on boldness
    • Turn off boldness

    Perhaps two methods are needed: IsBold() and BoldSet():

    func (r RunProperties) IsBold() bool {
    	if r.x.B != nil {
    		if r.x.B.ValAttr != nil && r.x.B.ValAttr.Bool != nil && *r.x.B.ValAttr.Bool == false {
    			return false
    		} else {
    			return true
    		}
    	} else {
    		return false
    	}
    }
    func (r RunProperties) BoldSet() bool {
    	return r.x.B != nil
    }
    

    I also noticed an oddity in IsItalic():

    func (r RunProperties) IsItalic() bool {
    	if r.x == nil {
    		return false
    	}
    	return r.x.I != nil
    }
    

    All other methods assume that r.x is safely non-nil, so why this?

    opened by preciselytom 8
  • [question] Delete column

    [question] Delete column

    Is there any way to delete a column from a sheet?

    opened by polderudo 8
  • Does not compile on Windows

    Does not compile on Windows

    Description

    Trying to use document.New() on Windows.

    Expected Behavior

    It compiles.

    Actual Behavior

    Getting an error:

    go build baliance.com/gooxml/schema/soo/wml: C:\Go\pkg\tool\windows_amd64\compile.exe: fork/exec C:\Go\pkg\tool\windows_amd64\compile.exe: The filename or extension is too long.
    
    opened by levrik 8
  • Images disappear from presentation

    Images disappear from presentation

    Description

    When working on a presentation using a template, it gets corrupted. As a result, when opening in PowerPoint, PowerPoint will "repair" the file but the references to images are lost. According to the pptx file size, the pictures are still in the file, but they don't show up in the presentation anymore.

    Expected Behavior

    Pictures stay where they are when working with templates.

    Actual Behavior

    According to the pptx file size, the pictures are still in the file, but they don't show up in the presentation anymore. Instead, warning signs are shown.

    The following errors are shown:

    2019/11/13 22:50:55 unsupported relationship type: http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesMaster tgt: ppt/notesMasters/notesMaster1.xml
    2019/11/13 22:50:55 unsupported relationship type: http://schemas.openxmlformats.org/officeDocument/2006/relationships/handoutMaster tgt: ppt/handoutMasters/handoutMaster1.xml
    2019/11/13 22:50:55 unsupported relationship type: http://schemas.openxmlformats.org/officeDocument/2006/relationships/presProps tgt: ppt/presProps.xml
    2019/11/13 22:50:55 unsupported relationship type: http://schemas.openxmlformats.org/officeDocument/2006/relationships/viewProps tgt: ppt/viewProps.xml
    2019/11/13 22:50:55 unsupported relationship type: http://schemas.openxmlformats.org/officeDocument/2006/relationships/tableStyles tgt: ppt/tableStyles.xml
    

    If this bug is not known so far, please let me know and I will try to produce a pptx test file for it.

    bug presentation 
    opened by probonopd 6
  • [Feature Request] Provide access to the

    [Feature Request] Provide access to the "Alias" and "Tag" properties of StructuredDocumentTag objects.

    Description

    Currently, while structured document tags are available for a document, programmatic access to the title and tag properties for each structured document tag is not. The API only provides access to the paragraphs.

    Expected Behavior

    Each StructuredDocumentTag object provides Alias() and Tag() functions.

    for _, sdt := range doc.StructuredDocumentTags() {
        fmt.Printf("Alias: '%v'\n", sdt.Alias()) // returns an alias or empty string for the SDT
        fmt.Printf("Tag: '%v'\n", sdt.Tag()) // returns a tag or empty string for the SDT
    }
    

    Actual Behavior

    No access to alias or tag for a structured document tag.

    Please include a reproducible code snippet or document attachment that demonstrates the issue.

    opened by glorious-beard 0
  • Unable to save after manipulating a document with embedded image

    Unable to save after manipulating a document with embedded image

    Description

    I am trying to use unioffice to open an existing document with and embedded image in the header and perform a mail merge and save, however, the after performing the merge, I am unable to save the document with the following returned error.

    unsupported image source: {_cgd:<nil> _bgdf:{_bgfb:<nil>} _ebf:{Size:{X:0 Y:0} Format: Path: Data:<nil>} _agb: _eca:word/media/image2.}

    The document is viewable in Word. Given the error above, it would seem that the image is getting embedded but is losing the file extension.

    If I remove the image in the header, the document processes normally.

    Expected Behavior

    I would expect the document to be able to load, as Word does.

    Actual Behavior

    Using the attached file above:


    err := license.SetLicenseKey(licenseKey, customerName)
    if err != nil {
    	panic(err)
    }
    
    doc, err := document.Open(filePath)
    if err != nil {
    	panic(err)
    }
    
        doc.MailMerge(context) // context is a valid map[string]string
    
    err = doc.TemplateDocument.Save(writer)
        if err != nil {
    	panic(err) // Error returned here.
    }
    

    US_Foods_Vendor_Agreement.docx

    I am able to control the documents, so if there is a remediation that can be done in word, that would be fine.

    opened by Trimeego 2
  • How to delete a table from document

    How to delete a table from document

    I process a word document where I need to replace some forms and eventually delete or hide tables based on condition. At the moment I didn't find any way to achieve it. What I tried is to manipulate the xml by unmarshalling it, here's how:

    ` buf := new(bytes.Buffer) buf.WriteString("")

    decoder := xml.NewDecoder(buf)
    
    err := doc.X().UnmarshalXML(decoder, xml.StartElement{})
    if err != nil {
    	fmt.Println(err)
    }
    

    `

    The error I get is: XML syntax error on line 1: unexpected EOF

    opened by Aled210 1
  • Fix readme typo

    Fix readme typo

    This change is Reviewable

    opened by nnqq 1
  • fix typo in document.Run

    fix typo in document.Run

    opened by rillig 3
  • fixed typo in method docs

    fixed typo in method docs

    Found a tiny typo in Golang docs of the Run struct methods. This PR fixes them to improve documentation


    This change is Reviewable

    opened by humanier 2
  • Support for RichTextRun in Spreadsheet

    Support for RichTextRun in Spreadsheet

    Description

    I was pulling content from an existing spreadsheet and noticed two cells which have content, but returned an empty string from cell.GetRawValue() and cell.GetString(). After digging into the raw xml, I noticed that the shared string for it looked like:

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <sst count="1" uniqueCount="1" xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">
    	<si>
    		<r>
    			<t xml:space="preserve">some content and </t>
    		</r>
    		<r>
    			<rPr>
    				<sz val="11"/>
    				<color rgb="FF000000"/>
    				<rFont val="Calibri"/>
    				<family val="2"/>
    			</rPr>
    			<t>example.com</t>
    		</r>
    		<r>
    			<rPr>
    				<sz val="11"/>
    				<color theme="1"/>
    				<rFont val="Calibri"/>
    				<family val="2"/>
    				<scheme val="minor"/>
    			</rPr>
    			<t>and more content.</t>
    		</r>
    	</si>
    </sst>
    

    I figured the runs were the issue. I dug through the code, and while RichTextRun exists, it doesn't seem to be used anywhere. I also inspected all attributes on cell.X() (sml.CT_Cell) and couldn't find the runs anywhere. It appears that RichTextRuns are not even being parsed in to the CT_Cell from what I can tell.

    Expected Behavior

    GetFormattedValue() should not be empty when a cell has content displayed in Excel. Ideally GetString() would be updated to return a plaintext version of the content, though according to how GetString is documented, it is currently working as expected.

    Actual Behavior

    GetFormattedValue() returns and empty string for cells with RichTextRuns. There is also no method that I was able to find to access the raw RichTextRun content directly through cell.X().

    I've attached a shreadsheet with RichTextRun content in A1: wb.xlsx.

    feature add-schema spreadsheet 
    opened by freb 0
  • Ability to add svg/eps/emf images

    Ability to add svg/eps/emf images

    Description

    Expected Behavior

    Actual Behavior

    it would be nice to have the ability to insert *.svg OR *.eps OR *.emf images.

    feature document 
    opened by vmvz 2
  •  Office2007 is not supported

    Office2007 is not supported

    Description

    Expected Behavior

    Actual Behavior

    Please include a reproducible code snippet or document attachment that demonstrates the issue.

    eval document repro 
    opened by liz-lizhan 6
  • document: Feature Request: InsertParagraphAfterTable

    document: Feature Request: InsertParagraphAfterTable

    When creating a document, things get a little annoying once you start working with tables. I think one of the main annoyances is that once you have a table in the document, you cannot continue adding content after you've inserted the table. Instead you have to do something like:

    p1 := doc.AddParagraph()
    pAfterTable := doc.InsertParagraphAfter(p1)
    table := doc.InsertTableAfter(p1)
    
    // now I can use pAfterTable to continue adding content
    

    If you have a table reference and you want to add another table directly after it, you'd have to take the additional step of deleting pAfterTable, which would have only been created so that you have a pointer to content after the first table.

    There are currently funcs for:

    • InsertTableAfter (paragraph)
    • InsertParagraphAfter (paragraph)
    • The Before version of these two

    It would be nice to have

    • InsertParagraphAfter (table)
    • InsertTableAfter (table), though I think two tables in a row without a paragraph in between is not very common.

    I started writing my own function for InsertParagraphAfter (table), but it was sufficiently complex that it was easier to just work around it.

    feature document 
    opened by freb 1
Releases(v1.16.0)
  • v1.16.0(Nov 10, 2021)

    UniOffice v1.16.0 includes new features and improvements. Node support now enables working with docx document contents in a generic fashion and makes it easy to find and copy content across documents. In addition, significant improvements have been made in PDF conversion quality. Log level support also reduces noise in outputs on standard output by default, but enables getting more detailed debug logs as needed.

    Changes:

    • Node support enables working generically with documents to find and copy contents across docx files. [UO-98].
    • Improved logging with multiple log levels. Added common/logger package [UO-96]
    • PPTX to PDF improvement: List support [UO-107]
    • DOCX to PDF improvement: Retaining field data in conversions [UO-109]

    New examples:

    • Node: Combining selected docx document contents from multiple files into one. https://github.com/unidoc/unioffice-examples/tree/master/document/node-combine
    • Node: Extracting selected docx document contents https://github.com/unidoc/unioffice-examples/tree/master/document/node-extraction
    • Node: Identifying and selecting specific document contents and saving to file https://github.com/unidoc/unioffice-examples/tree/master/document/node-selection
    Source code(tar.gz)
    Source code(zip)
  • v1.15.0(Sep 22, 2021)

    UniOffice v1.15.0 introduces support for conversions Powerpoint PPTX presentations to PDF files. In addition, a few other enhancements have been made.

    Changes:

    [UO-101] Sequence numbers are not part of extracted text [UO-95] Crash when converting Word to PDF [UO-106] Improve Word to PDF paragraph spacing and such [UO-104] Convert pptx to pdf

    New examples for UniOffice v1.15.0:

    • Powerpoint PPTX to PDF conversion examples: https://github.com/unidoc/unioffice-examples/tree/master/presentation/convert_to_pdf

    • Text extraction with numbering for Word docx documents https://github.com/unidoc/unioffice-examples/tree/master/document/text_extraction_with_numbering/main.go

    Source code(tar.gz)
    Source code(zip)
  • v1.14.0(Aug 23, 2021)

    UniOffice v1.14.0 includes the following changes:

    • Convert Excel spreadsheets (XLSX) to PDF [UO-94]
    • Fix duplicate mc:Ignorable attribute [UO-93]
    • Mail merge header image issue [UO-100]
    • Several images error fix [UO-103]

    New examples for UniOffice v1.14.0:

    • Example for XLSX to PDF conversion https://github.com/unidoc/unioffice-examples/tree/master/spreadsheet/convert_to_pdf
    • Licensing updated to use unicloud metered license by default in examples and providing another example for offline license key usage https://github.com/unidoc/unioffice-examples/tree/master/license
    Source code(tar.gz)
    Source code(zip)
  • v1.13.0(Jul 30, 2021)

    This minor version release includes the following changes:

    • Word docx watermark support. Text and image based watermarks. [UO-62]
    • Powerpoint extraction fixes [UO-92]
    • Word docx to pdf conversion improvements - Support composite fonts, including chinese, japanese, korean symbolic font files. [UO-91]

    New examples for UniOffice v1.13.0

    • DOCX to PDF conversion with custom composite symbolic fonts (chinese, japanese, korean for instance). https://github.com/unidoc/unioffice-examples/tree/master/document/doc-to-pdf-fonts
    • DOCX to PDF example updates https://github.com/unidoc/unioffice-examples/blob/master/document/doc-to-pdf
    • Adding an image-based watermark to a docx file https://github.com/unidoc/unioffice-examples/tree/master/document/watermark-picture
    • Adding a text-based watermark to a docx file https://github.com/unidoc/unioffice-examples/tree/master/document/watermark-text
    Source code(tar.gz)
    Source code(zip)
  • v1.12.0(Jun 16, 2021)

    This minor version release includes the following changes:

    • Multiple PDF conversion fixes: Chart handling, indentation and font styles, hyperlinks

    • Add image wrapping options (document package) [UO-80]

    • Paragraph indent and line spacing with example page size and orientation (document package) [UO-83]

    • Extract hyperlink in r.Text() [UO-90] Resolves #268

    New examples

    Source code(tar.gz)
    Source code(zip)
  • v1.11.0(May 31, 2021)

    This minor version adds

    • Add capability to set Cell Protection in spreadsheets [UO-88] Added example: https://github.com/unidoc/unioffice-examples/tree/master/spreadsheet/cell-protection
    • Minor schema fixes
    Source code(tar.gz)
    Source code(zip)
  • v1.10.0(Apr 24, 2021)

  • v1.9.0(Mar 16, 2021)

    This minor release adds:

    • Metered license support
    • Add Any fields for CT_Background, CT_Object, CT_Picture [UO-78]
    • Add activeX control type to parse activeX fields. [UO-73]
    Source code(tar.gz)
    Source code(zip)
  • v1.8.0(Jan 6, 2021)

    The v1.8.0 minor version release of UniOffice includes the following new features:

    • Text extraction for document, spreadsheet, presentation packages Both vectorized (objects) and plain text. New examples:
      • Word document docx text extraction: https://github.com/unidoc/unioffice-examples/blob/master/document/text_extraction/main.go
      • Excel spreadsheet text extraction: https://github.com/unidoc/unioffice-examples/blob/master/spreadsheet/text_extraction/main.go
      • Powerpoint presentation text extraction: https://github.com/unidoc/unioffice-examples/blob/master/presentation/text_extraction/main.go
    • Support for AlternateContent (Any) in runs and paragraphs (textbox support)
      • New example: https://github.com/unidoc/unioffice-examples/blob/master/document/run-properties/main.go As well as used in textbox extraction for paragraphs in the new text extraction support.
    Source code(tar.gz)
    Source code(zip)
  • v1.7.1(Dec 17, 2020)

    This patch version release 1.7.1 of UniOffice contains the following fixes:

    • Formula parsing and evaluation fixes [UO-49] Round of fuzzing and fixing issues. Added compilation and evaluation timeouts. Multiple fixes in various formula handlers, input and bounds checking to avoid crashing.
    • Address issues with images in spreadsheets [UO-71, UO-79, USD-47] Addresses schema issues that came up when images were added in spreadsheets.
    Source code(tar.gz)
    Source code(zip)
  • v1.7.0(Nov 9, 2020)

    This minor version release 1.7.0 of UniOffice contains the following fixes and enhancements:

    Fixes and enhancements

    • Support for merging docx documents [UO-19] Document now has an Append function to append another document to it Example for merging documents: https://github.com/unidoc/unioffice-examples/blob/master/document/merge-documents/main.go

    • Improved document header creation and modification support [UO-63] Fixes https://github.com/unidoc/unioffice/issues/405 New example for creating and updating header: https://github.com/unidoc/unioffice-examples/tree/master/document/doc-existing-header New example for creating header on even/odd pages: https://github.com/unidoc/unioffice-examples/tree/master/document/even-odd-header

    • Improved schema support for union functions [UO-54] Fixes https://github.com/unidoc/unioffice/issues/243

    • Fix to make document.RemoveParagraph remove from table cells also [UO-53] Fixes https://github.com/unidoc/unioffice/issues/412

    Source code(tar.gz)
    Source code(zip)
  • v1.6.0(Oct 13, 2020)

    This minor version release 1.6.0 of UniOffice contains the following fixes and enhancements:

    Fixes and enhancements

    Source code(tar.gz)
    Source code(zip)
  • v1.5.1(Aug 31, 2020)

  • v1.5.0(Aug 23, 2020)

    Version 1.5.0 has multiple enhancements and new features.

    Highlights

    New features include:

    Other:

    • Close function added in document, spreadsheet, presentation to properly clean up resources. All examples updated to include this.

    As well as various bugfixes.

    Note that UniOffice is a commercial library and requires an electronic license code to operate. A free trial can be obtained at https://unidoc.io/

    Source code(tar.gz)
    Source code(zip)
  • v1.4.0(Jun 30, 2020)

    Version 1.4.0 has multiple fixes and improvements.

    Highlights

    In particular there are improvements in Powerpoint presentation and creating pptx files from potx templates. In addition,

    • Improved support in Powerpoint presentation and creating pptx files from potx templates.
    • New example for creating powerpoint pptx presentations from templates with images: https://github.com/unidoc/unioffice/blob/master/_examples/presentation/use-template-with-image/main.go
    • Improved automatic build to run automatic validation of all input and output files to improve quality control and catch regressions.
    • Fixes in strict conformance document output and ability to control conformance level. Includes an example: https://github.com/unidoc/unioffice/blob/master/_examples/document/set-strict/main.go

    Pull requests

    • #414 New data and package names in schema (#414) (@zgordan-vv)
    • #413 dml struct names fix (#413) (@zgordan-vv)
    • #409 Presentation tests (#409) (@zgordan-vv)
    • #407 Resolve UO-27, UO-28, UO-31 (#407) (@zgordan-vv)
    • #406 Fixes in CI (#406) (@gunnsth)
    • #404 Validating examples (#404) (@zgordan-vv)
    • #395 PPT relationships, image fix (#395) (@zgordan-vv)
    • #400 SaveAsTemplate and SaveToFileAsTemplate are added for presentation (#400) (@zgordan-vv)
    • #398 error with incorrect content types names fixed when deleting slides a… (#398) (@zgordan-vv)
    • #399 document.SetConformance is added with an example (#399) (@zgordan-vv)
    • #397 Add nil checks to prevent crash UO-26 (#397) (@gunnsth)
    Source code(tar.gz)
    Source code(zip)
  • v1.3.1(May 18, 2020)

    This version contains bug fixes and a couple of new features.

    New features

    • High level functions for getting paragraph and run properties and style information
    • New play for extracting paragraph and run properties from table: https://play.unidoc.io/p/9f1ed9d356940989
    • New example for adding paragraphs before and after tables: https://github.com/unidoc/unioffice/blob/master/_examples/document/paragraphs_in_table/main.go
    • High level functions for getting endnotes and footnotes from documents
    • New example showcasing support for getting footnotes and endnotes: https://github.com/unidoc/unioffice/blob/master/_examples/document/endnotes_footnotes/main.go

    Pull requests merged

    • #392 paragraph and run properties (#392) (@zgordan-vv)
    • #387 Issue #385 fix (#387) (@zgordan-vv)
    • #384 numbering fix (#384) (@zgordan-vv)
    • #380 Fixes for being able to compile with playground (#380) (@zgordan-vv)
    • #377 Get all cells in a row with empty ones (#377) (@zgordan-vv)
    • #374 add the ability to utilize footnotes and endnotes in documents (#374) (@compleatang)
    Source code(tar.gz)
    Source code(zip)
  • v1.3.0(Feb 18, 2020)

    Highlights

    • Significantly enhanced support for Excel formula functions in spreadsheets
    • Enhanced formula parser and more functions implemented
    • Capability to remove columns with automatic reference updates
    • New example to flatten spreadsheets

    Pull requests involved:

    • #371 Spreadsheet: Remove columns feature (Issue #367) (#371) (@zgordan-vv)
    • #369 copying cell formats when flattening (#369) (@zgordan-vv)
    • #368 Flatten fixes (#368) (@zgordan-vv)
    • #366 Spreadsheet formulas: Flattening files (#366) (@zgordan-vv)
    • #363 Test cases for functions for https://github.com/unidoc/unioffice/issues/336 (#363) (@zgordan-vv)
    • #362 Financial functions: part 4 (#362) (@zgordan-vv)
    • #361 Financial functions: part 3 (#361) (@zgordan-vv)
    • #360 Financial functions: part 2 (#360) (@zgordan-vv)
    • #359 Financial functions - part 1 (#359) (@zgordan-vv)
    • #357 Test cases for SUM and IF (#357) (@zgordan-vv)
    • #354 TEXT (#354) (@zgordan-vv)
    • #353 Excel functions part 4 (#353) (@zgordan-vv)
    • #351 Excel spreadsheet functions, part 3 (#351) (@zgordan-vv)
    • #348 Functions2 (#348) (@zgordan-vv)
    • #345 Spreadsheed Formula Functions (#345) (@zgordan-vv)
    Source code(tar.gz)
    Source code(zip)
  • v1.2.1(Oct 23, 2019)

    This version contains bug fixes and a few new minor features.

    Fixes and enhancements.

    • #340 Optional custom.xml (#340) (@zgordan-vv)
    • #335 watermarks for spreadsheets and presentations (#335) (@zgordan-vv)
    • #330 #315, #323, #329 (#330) (@zgordan-vv)
    • #308 Refactor header/footer reusing document.tables (#308) (@5andr0)
    • #309 Support custom metadata in document properties (#309) (@zgordan-vv)
    • #311 issue with paragraph containing several form fields #305 fix (#311) (@zgordan-vv)
    • #306 add hh time format support (#306) (@lunny)
    • #295 Add images from bytes for presentation and workbook (#295) (@mec07)
    • #303 Add tables loop to Paragraphs funcs of Header and Footer (#303) (@nkryuchkov)
    • #291 Fix runtime panic when making a presentation from a template (#291) (@mec07)
    • #299 Fix comment on the AddSheet (#299) (@nkryuchkov)
    Source code(tar.gz)
    Source code(zip)
  • v1.2.0(Jun 13, 2019)

  • v1.1.0(May 27, 2019)

    Package renamed to unioffice and import path updated to github.com/unidoc/unioffice

    Feature Additions

    • Functions to copy and remove sheets (#281)
    • Add tables loop to document's Paragraphs func (#280)
    • Add purl.oclc.org namespace support (#265)
    • include CT_SdtRow entries in table.Rows() (#261)
    • include CT_SdtCell entries in row.Cells() (#260)
    • Included nested tables in document.Tables() output (#257)
    • Support fetching bookmarks within tables, including recursively (#255)
    • Image from data (#251)
    • Added a RemoveCalcChain function to remove the un-needed cached calculation chain (#215)
    • Added support for nested tables in documents (#221)
    • Document Set/Get MultiLevelType (#222 )
    • NumberingLevel now starts numbering at 1 by default, not 0. (#222 )
    • Support SetAlignment(), SetStartIndent() and SetHangingIndent() in ParagraphStyleProperties (#222 )
    • Add support for Run page breaks (#222 )
    • Support cell rotation in spreadsheets (#226)
    • Added color RGBA constructor (#235)

    Bug Fixes

    • Look for mail merge fields inside tables (#223)
    • Specify custom row height attribute to allow setting row heights (#232)
    Source code(tar.gz)
    Source code(zip)
  • v1.0.1(Oct 14, 2018)

  • v1.0.0(Sep 28, 2018)

    As the code is now in production by several commercial customers, we're tagging a v1.0.0 release. We will be following standard Semantic Versioning from here on out for everything outside of the schema directory, but don't expect any major changes even in there. Thanks to everyone who has supported gooxml in it's first year!

    Source code(tar.gz)
    Source code(zip)
  • v0.9.2(Sep 28, 2018)

    What's New

    • document: Support for controlling table cell margins #202
    • spreadsheet: Support inserting rows within a sheet #203

    Bug Fixes

    • Fix bug in IsBold for runs with a bold property set to false #204
    Source code(tar.gz)
    Source code(zip)
  • v0.9.1(Sep 17, 2018)

  • v0.9.0(Sep 14, 2018)

    What's New

    • Added a go.mod file for those transitioning to modules
    • Now tested on go 1.8.x, go 1.9.x, go 1.10.x and go1.11.x.

    Bug Fixes

    • Correct fix for allowing embedded JPEGs #188
    • Allow more tolerance in parsing to support some Google Docxuments files #196
    • Fix relationship ID generation when editing files generated by other tools #198
    Source code(tar.gz)
    Source code(zip)
  • 0.8(Jul 27, 2018)

    Status

    What's New

    Document

    • support for paragraph line spacing control
    • support for adding rows within a table (before or after another row)
    • support for merge fields

    Bug Fixes

    • Allow embedded JPEGs #188
    Source code(tar.gz)
    Source code(zip)
  • v0.7.1(May 26, 2018)

  • v0.7.0(Apr 5, 2018)

    Status

    What's New

    Common

    Presentation

    • Create from template #168

    Document

    • Support for iterating over tables #162
    • Vertically merged cells #164
    • Non-dirty fields #171

    Bug Fixes

    • Fix paragraph numbering #161
    Source code(tar.gz)
    Source code(zip)
  • v0.6.0(Feb 20, 2018)

    Status

    What's New

    Common

    • More control over app/core properties
    • Fixed format of version in app properties

    Presentation

    Document

    • Add support for controlling paragraph indentation #123
    • Bookmarks and hyperlinks to bookmarks #126
    • Support for using pre-defined table styles #130
    • Support for inline images #134
    • Support for paragraph numbering/indentation #136
    • Support for table layouts #140
    • Support for super/sub script #151

    Bug Fixes

    • Fix path separator on Windows #146
    Source code(tar.gz)
    Source code(zip)
  • v0.5(Nov 18, 2017)

    Status

    What's New

    Presentation

    • Added initial presentation support

    Document

    • Added more complex tables example #106
    • Add more table control (alignment, centering, etc.) #109 #112
    • Support hyperlinks #113
    • Added support for table cell shading and cell paragraph alignment
    • Edit header/footer contents #117

    Bug Fixes

    • Removed round-tripping of extra content on Workbook #107
    Source code(tar.gz)
    Source code(zip)
Owner
UniDoc
PDF and Office (docx, xlsx, pptx) libraries for Golang
UniDoc
Fast and reliable way to work with Microsoft Excel™ [xlsx] files in Golang

Xlsx2Go package main import ( "github.com/plandem/xlsx" "github.com/plandem/xlsx/format/conditional" "github.com/plandem/xlsx/format/conditional/r

Andrey G. 144 Nov 22, 2021
A simple and light excel file reader to read a standard excel as a table faster | 一个轻量级的Excel数据读取库,用一种更`关系数据库`的方式解析Excel。

Intro | 简介 Expect to create a reader library to read relate-db-like excel easily. Just like read a config. This library can read all xlsx file correct

Back Yu 130 Nov 22, 2021
Go (golang) library for reading and writing XLSX files.

XLSX Introduction xlsx is a library to simplify reading and writing the XML format used by recent version of Microsoft Excel in Go programs. Tutorial

Geoffrey J. Teale 5.2k Nov 26, 2021
Golang bindings for libxlsxwriter for writing XLSX files

goxlsxwriter provides Go bindings for the libxlsxwriter C library. Install goxlsxwriter requires the libxslxwriter library to be installe

Frank Terragna 17 Nov 12, 2021
Golang bindings for libxlsxwriter for writing XLSX files

goxlsxwriter goxlsxwriter provides Go bindings for the libxlsxwriter C library. Install goxlsxwriter requires the libxslxwriter library to be installe

Frank Terragna 730 May 30, 2021
A Go native tabular data extraction package. Currently supports .xls, .xlsx, .csv, .tsv formats.

grate A Go native tabular data extraction package. Currently supports .xls, .xlsx, .csv, .tsv formats. Why? Grate focuses on speed and stability first

Jeremy Jay 98 Nov 20, 2021
一款 Go 语言编写的小巧、简洁、快速采集 fofa 数据导出到 Excel 表单的小工具。

fofa 一款 Go 语言编写的小巧、简洁、快速采集 fofa 数据导出到 Excel 表单的小工具。 Goroutine + retryablehttp Build git clone https://github.com/inspiringz/fofa cd fofa go build -ldf

3ND 13 Nov 15, 2021
A simple excel engine without ui to parse .csv files.

A simple excel engine without ui to parse .csv files.

Akmal Hossain 1 Nov 4, 2021
Fastq demultiplexer for single cell data from MGI sequencer (10x converted library).

fastq_demultiplexer Converts fastq single cell data from MGI (10x converted library) to Illumina compatible format. Installation go install github.com

Rostislav Vorobev 0 Nov 24, 2021
word2text - a tool is to convert word documents (DocX) to text on the CLI with zero dependencies for free

This tool is to convert word documents (DocX) to text on the CLI with zero dependencies for free. This tool has been tested on: - Linux 32bit and 64 bit - Windows 32 bit and 64 bit - OpenBSD 64 bit

Ryan Thomas 5 Apr 19, 2021
golang 在线预览word,excel,pdf,MarkDown(Online Preview Word,Excel,PPT,PDF,Image by Golang)

Go View File 在线体验地址 http://39.97.98.75:8082/view/upload (不会经常更新,保留最基本的预览功能。服务器配置较低,如果出现链接超时请等待几秒刷新重试,或者换Chrome) 目前已经完成 docker部署 (不用为运行环境烦恼) Wor

CZC 31 Nov 30, 2021
Golang wrapper for Exiftool : extract as much metadata as possible (EXIF, ...) from files (pictures, pdf, office documents, ...)

go-exiftool go-exiftool is a golang library that wraps ExifTool. ExifTool's purpose is to extract as much metadata as possible (EXIF, IPTC, XMP, GPS,

null 88 Nov 28, 2021
Golang library for reading and writing Microsoft Excel™ (XLSX) files.

Excelize Introduction Excelize is a library written in pure Go providing a set of functions that allow you to write to and read from XLSX / XLSM / XLT

360 Enterprise Security Group, Endpoint Security, inc. 10.1k Nov 27, 2021
Golang library for reading and writing Microsoft Excel™ (XLSX) files.

Excelize Introduction Excelize is a library written in pure Go providing a set of functions that allow you to write to and read from XLSX / XLSM / XLT

360 Enterprise Security Group, Endpoint Security, inc. 10.1k Dec 2, 2021
Golang library for reading and writing Microsoft Excel™ (XLSX) files.

Excelize Introduction Excelize is a library written in pure Go providing a set of functions that allow you to write to and read from XLSX / XLSM / XLT

360 Enterprise Security Group, Endpoint Security, inc. 10.2k Dec 6, 2021
Extract text from plaintext, .docx, .odt and .rtf files. Pure go.

cat This is a simple libary to extract text from plaintext, .docx, .odt, .pdf and .rtf files. Install go get -u github.com/lu4p/cat Basic Usage packag

null 57 Nov 20, 2021
Command-line tool to load csv and excel (xlsx) files and run sql commands

csv-sql supports loading and saving results as CSV and XLSX files with data processing with SQLite compatible sql commands including joins.

Dhamith Hewamullage 24 Sep 30, 2021
Fast and reliable way to work with Microsoft Excel™ [xlsx] files in Golang

Xlsx2Go package main import ( "github.com/plandem/xlsx" "github.com/plandem/xlsx/format/conditional" "github.com/plandem/xlsx/format/conditional/r

Andrey G. 144 Nov 22, 2021
Online Preview Word,Excel,PPT,PDF,Image by Golang

Online Preview Word,Excel,PPT,PDF,Image by Golang.基于Golang的在线预览Word,Excel,PPT,PDF,图片.

Yilong Li 156 Nov 22, 2021
A simple and light excel file reader to read a standard excel as a table faster | 一个轻量级的Excel数据读取库,用一种更`关系数据库`的方式解析Excel。

Intro | 简介 Expect to create a reader library to read relate-db-like excel easily. Just like read a config. This library can read all xlsx file correct

Back Yu 130 Nov 22, 2021
Golang PDF library for creating and processing PDF files (pure go)

UniPDF - PDF for Go UniDoc UniPDF is a PDF library for Go (golang) with capabilities for creating and reading, processing PDF files. The library is wr

UniDoc 1.4k Dec 2, 2021
Package kml provides convenince methods for creating and writing KML documents.

go-kml Package kml provides convenience methods for creating and writing KML documents. Key Features Simple API for building arbitrarily complex KML d

Tom Payne 62 Nov 17, 2021
New GF (Go Frame) based back office management system

GFast-V2 平台简介 基于全新GF(Go Frame)的后台管理系统 前端采用ruoyi-ui 、Vue、Element UI。 阿里云优惠券:点我进入,腾讯云优惠券:点我领取 本项目由奇讯科技团队开发。 特征 高生产率:几分钟即可搭建一个后台管理系统 模块化:单应用多系统的模式,将一个完整的

Mr.Qin 2 Nov 9, 2021
Go (golang) library for reading and writing XLSX files.

XLSX Introduction xlsx is a library to simplify reading and writing the XML format used by recent version of Microsoft Excel in Go programs. Tutorial

Geoffrey J. Teale 5.2k Dec 6, 2021
Go (golang) library for reading and writing XLSX files.

XLSX Introduction xlsx is a library to simplify reading and writing the XML format used by recent version of Microsoft Excel in Go programs. Tutorial

Geoffrey J. Teale 5.2k Nov 26, 2021
Go (golang) library for reading and writing XLSX files.

XLSX Introduction xlsx is a library to simplify reading and writing the XML format used by recent version of Microsoft Excel in Go programs. Current s

Geoffrey J. Teale 5.2k Dec 4, 2021
A Golang library to manipulate strings according to the word parsing rules of the UNIX Bourne shell.

shellwords A Golang library to manipulate strings according to the word parsing rules of the UNIX Bourne shell. Installation go get github.com/Wing924

Wei He 16 Nov 20, 2021
Image processing algorithms in pure Go

bild A collection of parallel image processing algorithms in pure Go. The aim of this project is simplicity in use and development over absolute high

Anthony N. Simon 3.4k Dec 7, 2021
Golang bindings for libxlsxwriter for writing XLSX files

goxlsxwriter provides Go bindings for the libxlsxwriter C library. Install goxlsxwriter requires the libxslxwriter library to be installe

Frank Terragna 17 Nov 12, 2021