🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@ooxml-tools/file

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ooxml-tools/file

Read/write Office Open XML files in nodejs/browser

latest
Source
npmnpm
Version
0.6.5
Version published
Weekly downloads
81
161.29%
Maintainers
1
Weekly downloads
 
Created
Source

@ooxml-tools/file

Read/write Office Open XML files in nodejs/browser.

Support for reading and writing to

  • .docxWordprocessingML
  • .xlsxSpreadsheetML
  • 👷 .pptx — PresentationML (coming soon)

Usage

The module accepts a JSZip instance and adds some additional functionality

import { open, openAsArrayBuffer } from "@ooxml-tools/file";

await zip.loadAsync(openAsArrayBuffer(ooxmlpath));
const doc = open("docx", zip);
console.log(await docx.list());

CLI

# ooxml-file <command> [args]
#
# Commands:
#   formats                      list valid formats
#   init <ooxmlpath>              initializes a blank file (docx)
#   pack <ooxmlpath> <dirpath>    pack directory to docx file
#   unpack <ooxmlpath> <dirpath>  unpack docx to a directory
#   list <ooxmlpath>              list files in docx
#   read <ooxmlpath> <filepath>   read file inside docx to sdtout
#   write <ooxmlpath> <filepath>  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

codecov

License

MIT

FAQs

Package last updated on 09 Jun 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts