https://github.com/ooxml-tools/file
Inspect Office Open XML files in nodejs/browser
https://github.com/ooxml-tools/file
docx ooxml pptx xlsx
Last synced: 5 months ago
JSON representation
Inspect Office Open XML files in nodejs/browser
- Host: GitHub
- URL: https://github.com/ooxml-tools/file
- Owner: ooxml-tools
- Created: 2024-07-07T10:15:15.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-12-12T13:15:32.000Z (6 months ago)
- Last Synced: 2025-12-14T01:17:38.607Z (6 months ago)
- Topics: docx, ooxml, pptx, xlsx
- Language: TypeScript
- Homepage:
- Size: 248 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Read/write Office Open XML files in nodejs/browser.
Support for reading and writing to
- ✅ `.docx` — [WordprocessingML](http://officeopenxml.com/anatomyofOOXML.php)
- ✅ `.xlsx` — [SpreadsheetML](http://officeopenxml.com/anatomyofOOXML-xlsx.php) (coming soon)
- 👷 `.pptx` — [PresentationML](http://officeopenxml.com/anatomyofOOXML-pptx.php) (coming soon)
## Usage
The module accepts a [JSZip](https://github.com/Stuk/jszip) instance and adds some additional functionality
```js
import { open, openAsArrayBuffer } from "@ooxml-tools/file";
await zip.loadAsync(openAsArrayBuffer(docxpath));
const doc = open("docx", zip);
console.log(await docx.list());
```
## CLI
```bash
# ooxml-file [args]
#
# Commands:
# formats list valid formats
# init initializes a blank file (docx)
# pack pack directory to docx file
# unpack unpack docx to a directory
# list list files in docx
# read read file inside docx to sdtout
# write create/override file in docx
#
# Options:
# --version Show version number [boolean]
# --help Show help [boolean]
#
# Examples:
# ooxml-file init ./test.docx
# ooxml-file unpack ./test.docx test.docx.unpacked
# ooxml-file pack ./test.docx test.docx.unpacked
# ooxml-file list ./test.docx
# ooxml-file read ./test.docx word/document.xml
# ooxml-file write ./test.docx word/document.xml < input.xml
```
## CI
[](https://codecov.io/gh/ooxml-tools/file)
## License
MIT