1
0
mirror of https://github.com/fumiama/go-docx.git synced 2026-06-06 00:00:24 +08:00
Go to file
2023-02-24 21:25:20 +08:00
2023-02-23 13:20:31 +08:00
2023-02-24 21:23:22 +08:00
2023-02-20 22:48:04 +08:00
2023-02-21 16:12:20 +08:00
2023-02-20 22:48:04 +08:00
2023-02-23 13:20:31 +08:00
2023-02-24 16:14:09 +08:00
2023-02-24 16:14:09 +08:00
2023-02-24 16:14:09 +08:00
2023-02-24 16:14:09 +08:00
2023-02-24 21:25:20 +08:00
2023-02-24 16:14:09 +08:00
2023-02-24 16:14:09 +08:00
2023-02-24 16:14:09 +08:00
2023-02-24 16:14:09 +08:00
2023-02-23 22:41:29 +08:00
2023-02-20 22:48:04 +08:00
2023-02-24 16:14:09 +08:00
2023-02-24 16:14:09 +08:00
2023-02-24 16:14:09 +08:00
2023-02-24 16:14:09 +08:00
2023-02-24 16:14:09 +08:00
2023-02-24 16:14:09 +08:00
2023-02-24 16:23:32 +08:00
2023-02-24 16:14:09 +08:00
2023-02-24 16:14:09 +08:00
2023-02-24 16:14:09 +08:00
2023-02-24 16:14:09 +08:00
2023-02-24 16:14:09 +08:00
2023-02-24 16:14:09 +08:00
2023-02-24 16:14:09 +08:00
2023-02-24 16:14:09 +08:00
2023-02-24 16:14:09 +08:00
2023-02-24 16:14:09 +08:00
2023-02-24 21:23:22 +08:00
2023-02-24 21:23:22 +08:00
2023-02-24 16:14:09 +08:00
2023-02-24 16:14:09 +08:00

Docx library

One of the most functional libraries to read and write .docx (a.k.a. Microsoft Word documents or ECMA-376 Office Open XML) files in Go.

This is a variant optimized and expanded by fumiama. The original repo is gonfva/docxlib.

Introduction

As part of my work for Basement Crowd and FromCounsel, we were in need of a basic library to manipulate (both read and write) Microsoft Word documents.

The difference with other projects is the following:

  • UniOffice is probably the most complete but it is also commercial (you need to pay). It also very complete, but too much for my needs.
  • gingfrederik/docx only allows to write.

There are also a couple of other projects kingzbauer/docx and nguyenthenguyen/docx

gingfrederik/docx was a heavy influence (the original structures and the main method come from that project).

However, those original structures didn't handle reading and extending them was particularly difficult due to Go xml parser being a bit limited including a 6 year old bug.

Additionally, my requirements go beyond the original structure and a hard fork seemed more sensible.

The plan is to evolve the library, so the API is likely to change according to my company's needs. But please do feel free to send patches, reports and PRs (or fork).

In the mean time, shared as an example in case somebody finds it useful.

The Introduction above is copied from the original repo. I had evolved that repo again to fit my needs. Here are the supported functions now.

  • Parse and save document
  • Edit simple text (color, size, alignment, ...)
  • Edit picture
  • Edit table

License

AGPL-3.0. See LICENSE

Description
One of the most functional libraries to read and write .docx files (a.k.a. Microsoft Word documents or ECMA-376 Office Open XML) in Go.
Readme AGPL-3.0 2.1 MiB
Languages
Go 100%