unioffice for Go: a commercial OOXML library with a raw-type escape hatch and a 33MB binary
Pure go library for creating and processing Office Word (.docx), Excel (.xlsx) and Powerpoint (.pptx) documents
At a glance
- What is it?
- unioffice is UniDoc's Go library for creating and editing Word, Excel and PowerPoint files without external tools. This analysis covers the license key it requires, how unevenly the three formats are covered, what the published benchmark shows, and how to reach XML the wrapper API does not expose.
- Who is it for?
- unioffice suits Go teams that need to generate or edit docx and xlsx files in-process and can accept a commercial license key. Choose something else if you need deep PowerPoint editing, if your build cannot reach the UniDoc licensing service, or if a 33MB binary is a problem.
- Can I use it commercially?
- Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
- Is it still maintained?
- Yes. The repository last received commits 2 days ago.
- What is it written in?
- Mainly Go, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.
Star history
- unidoc/unioffice4,944 ★ · +8
| Repository | 2026-09-23 | 2026-11-15 |
|---|---|---|
| unidoc/unioffice | 4.9k | 4.9k |
8 Stars in the last 53 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
A license key stands between go get and a working document
The README is direct about the commercial nature of unioffice: it is a commercial product and requires a license code to operate. A Metered License API key in the Free Tier comes from signing up at cloud.unidoc.io. The module is fetched in the ordinary way.
go get github.com/unidoc/unioffice/v2The GitHub license field reads NOASSERTION, and the repository carries LICENSE.md, a CLA.md and an EULA link in its badges. That combination means the source is readable, but you should not treat it like an MIT-style dependency.
The consequence is operational. A metered key implies that your application has to be configured with it, and your legal team needs to read the EULA at unidoc.io/eula before the library ships in a product. Open-source libraries for the same file formats do not impose this step, so factor the sign-up and review into your estimate, not just the import line.
Word and Excel get most of the surface, while PowerPoint stays narrow
The status list is the clearest map of what the library does. For docx it lists read, write and edit, formatting, images, tables and Word to PDF conversion. For xlsx it lists read, write and edit, cell formatting including conditional formatting, cell validation with drop-down combo boxes, retrieving cell values as Excel formats them, formula evaluation, embedded images and all chart types.
PowerPoint has two lines: creation from templates, and textboxes and shapes. The presentation examples match, covering simple text boxes, image insertion and a template. Nothing in that list covers animations, slide transitions or charts inside slides.
If your job is to fill a deck from a template and drop in text and pictures, the coverage fits. If it is to read an existing presentation and rewrite its content, you will be working through raw types, described below. Plan the pptx work first, because it is the format most likely to send you to the schema package.
Formula evaluation stops at 100 plus functions
The spreadsheet package can evaluate formulas, and the README states the scale precisely: more than 100 functions are supported currently, with more to be added as required. That wording is a boundary. Excel's function set is larger, and a workbook that uses a function outside the supported set will not evaluate the way Excel would.
A related feature is retrieving cell values as formatted by Excel, such as a date or number as displayed. That helps when a downstream system needs the text a user sees rather than the stored serial number.
The practical advice is to test your actual formulas. Build a small workbook that uses every function your reports depend on, evaluate it through the library and compare the results against Excel's own. The spreadsheet examples include number, date and time formats, named cells and ranges, merged cells, borders, frozen rows and columns, validation, conditional formatting with gradients, icons and data bars, and charts, so most layout needs have a worked starting point.
The published benchmark favors writing, penalizes reading and inflates the binary
The README reports numbers for a spreadsheet of 30,000 rows with 100 columns each: creating the cells took 3.92506863 seconds, saving took 89 nanoseconds and reading took 9.522383048 seconds. It explains that creation is fairly fast, saving is very quick because no reflection is used, and reading is a bit slower.
The cost is binary size. The README states that the binary is 33MB because it contains generated structs, plus serialization and deserialization code, for all of DOCX, XLSX and PPTX. You pay that size even if your program only touches one format.
Two cautions follow. The figures come from the project's own benchmark in the unioffice-examples repository, under spreadsheet/lots-of-rows, and they were taken on hardware the README does not name. Reading a file roughly 2.4 times slower than creating it also matters for services that open large uploaded workbooks, so measure the read path first if that is your workload. Container size budgets should include the 33MB.
Raw types let you edit the XML the wrapper API does not cover
The OOXML specification is large, so the library offers a friendly API for common cases and lets you fall back to raw manipulation. The raw XML types live in the schema directory, and every wrapper type exposes its raw form through an X() method.
The README's own example is the document background color, which has no API today. You reach into the CT_Background element instead.
doc := 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()This escape hatch is what makes the narrow PowerPoint support survivable, but it moves the work onto you. You have to know the element names from the OOXML specification, and raw edits bypass any checking the wrapper layer would have done. A hand-built element can produce a file that Word or PowerPoint refuses to open, so keep a small set of sample outputs and open them in the real applications.
Packages are split by format, with UniDoc modules underneath
The repository is organized by concern: document, spreadsheet and presentation for the three formats, schema for the generated raw types, and chart, color, drawing, measurement, vmldrawing, zippkg, algo, common and utils for shared pieces. The module path is github.com/unidoc/unioffice/v2 and it declares go 1.25.0.
The direct requirements include several UniDoc packages: unipdf/v5 v5.1.0, unichart v0.5.2, unitype v0.5.1 and emf v0.2.0. Others are msoleps, testify and golang.org/x/image. The Word to PDF feature in the status list sits next to a unipdf dependency in go.mod, which is the first place to look if you need to understand what the conversion relies on.
The consequence of the tree is that one import pulls a family of UniDoc code into your build. If you audit dependencies, you review the UniDoc modules and a long indirect list that includes logrus, freetype forks, x/crypto and pkcs7, not just the single module you added.
Releases arrive every month or two and contributions go through the vendor
Recent tags are v2.12.0 on 29 June, v2.13.0 on 13 August and v2.14.0 on 21 September 2026. The last push was the same day as v2.14.0, 21 September 2026, so the most recent activity is a release commit rather than later work on master. The repository is not archived.
Contribution is gated. The README says only that if you are interested in contributing you should contact the maintainers, and a CLA.md sits at the top level. That is a different model from an open pull request flow, so do not expect to land a fix quickly from outside UniDoc.
For support, your realistic paths are the API documentation at apidocs.unidoc.io, the examples repository and your license relationship with the vendor. Pin the version in go.mod, and read each release's notes before moving between minor versions of the v2 line.
Editorial conclusion
unioffice suits Go teams that need to generate or edit docx and xlsx files in-process and can accept a commercial license key. Choose something else if you need deep PowerPoint editing, if your build cannot reach the UniDoc licensing service, or if a 33MB binary is a problem. Before committing, read the EULA, sign up for a free-tier key, and run the 30k-row spreadsheet benchmark on your own hardware.
Frequently asked questions
Does unioffice require a license key?
Yes. The README says unioffice is a commercial product that needs a license code to operate. A Metered License API key in the Free Tier is available by signing up at cloud.unidoc.io.
Which file formats does unioffice handle?
It handles Word (.docx), Excel (.xlsx) and PowerPoint (.pptx). PowerPoint support is the narrowest, covering creation from templates and textboxes and shapes.
How big is a unioffice binary?
The README says the binary is 33MB because it contains generated structs and serialization code for all of DOCX, XLSX and PPTX.
How do I set something unioffice has no API for?
Use the X() method on a wrapper type to reach the raw XML types in the schema directory. The README shows setting a document background color through CT_Background this way.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/unidoc-unioffice)Star history chart for your README
[](https://hysenlabs.com/projects/unidoc-unioffice)Was this useful?