npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@robinpath/office

v0.1.1

Published

Microsoft Office document creation and reading (Word, Excel, PowerPoint) for RobinPath

Readme

@robinpath/office

Enterprise Microsoft Office suite — Word (.docx), Excel (.xlsx), PowerPoint (.pptx) with 57 functions: hyperlinks, TOC, footnotes, comments, sections, headers/footers, doc patching, conditional formatting, data validation, sheet protection, slide masters, and more

Category Functions Auth License

Why use this module?

The office module lets you:

  • Create a new Word document
  • Read text or HTML from an existing Word document
  • Add a heading with level and formatting
  • Add a paragraph with rich text formatting
  • Add a table with full styling (headers, borders, colors, widths)

All functions are callable directly from RobinPath scripts with a simple, consistent API.

Installation

npm install @robinpath/office

Quick Start

No credentials needed — start using it right away:

office.readDoc "./contract.docx" "text" into $content

Available Functions

| Function | Description | |----------|-------------| | office.createDoc | Create a new Word document | | office.readDoc | Read text or HTML from an existing Word document | | office.addHeading | Add a heading with level and formatting | | office.addParagraph | Add a paragraph with rich text formatting | | office.addTable | Add a table with full styling (headers, borders, colors, widths) | | office.addImage | Add an image to the document | | office.addPageBreak | Add a page break | | office.addList | Add a bulleted or numbered list | | office.addHyperlink | Add a clickable hyperlink to the document | | office.addBookmark | Add a named bookmark for cross-references | | office.addTableOfContents | Add an auto-generated table of contents from headings | | office.addFootnote | Add a footnote reference in text with footnote content at bottom | | office.addComment | Add a comment annotation on a text range | | office.addSection | Add a new document section with separate formatting (orientation, columns, margins) | | office.setDocProperties | Set document metadata properties (title, author, keywords) | | office.addDocStyle | Define a reusable named paragraph or character style | | office.addHeader | Add a custom header to the current section | | office.addFooter | Add a custom footer with optional page numbers | | office.patchDoc | Modify an existing .docx by replacing placeholders with new content | | office.addCheckbox | Add a checkbox with label text | | office.saveDoc | Save the Word document to a .docx file | | office.createSheet | Create a new Excel workbook | | office.readSheet | Read data from an existing Excel file | | office.addRow | Add a row with optional styling | | office.writeData | Write array of objects to sheet with auto-headers and styling | | office.writeCell | Write a value to a specific cell with formatting | | office.styleRange | Apply formatting to a range of cells | | office.addFormula | Add a formula to a cell | | office.setColumnWidth | Set column widths | | office.mergeCells | Merge a range of cells | | office.loadSheet | Load an existing Excel file for editing | | office.addWorksheet | Add a new worksheet to an existing workbook | | office.freezePanes | Freeze header rows and/or columns | | office.setAutoFilter | Add filter dropdowns on header columns | | office.addConditionalFormat | Add conditional formatting rules (color scales, data bars, icon sets, cell rules) | | office.addDataValidation | Add data validation (dropdowns, number/date constraints) to a cell | | office.addCellComment | Add a comment/note to a cell | | office.addSheetImage | Embed an image in a spreadsheet | | office.addNamedRange | Define a named range for formulas | | office.protectSheet | Protect a worksheet with a password and permission options | | office.hideRowsColumns | Hide or show rows and columns | | office.saveSheet | Save the workbook to an .xlsx file | | office.createSlides | Create a new PowerPoint presentation | | office.addSlide | Add a slide with optional title/subtitle and background | | office.addSlideText | Add a text box to a slide with full formatting | | office.addSlideImage | Add an image to a slide with positioning | | office.addSlideTable | Add a data table to a slide with styling | | office.addSlideChart | Add a chart to a slide | | office.addSlideShape | Add a shape to a slide | | office.addSlideNotes | Add speaker notes to a slide | | office.addSlideMultiText | Add rich text with mixed formatting (bold/italic/color) in one text box | | office.setSlideNumber | Add a slide number to a slide | | office.defineSlideMaster | Define a reusable slide master template with logo, background, and placeholders | | office.addSlideFromMaster | Create a new slide from a defined master template | | office.saveSlides | Save the presentation to a .pptx file | | office.setSheetPrint | Configure print layout: paper size, orientation, print area, margins | | office.groupRows | Group rows (or columns) into collapsible outline groups |

Examples

Read text or HTML from an existing Word document

office.readDoc "./contract.docx" "text" into $content

Add a heading with level and formatting

office.addHeading $doc "Sales Report" 1 {"color": "#2196F3", "alignment": "center"}

Add a paragraph with rich text formatting

office.addParagraph $doc "Revenue increased by 23%" {"bold": true, "fontSize": 12, "alignment": "justify", "spacing": {"after": 200}}

Integration with RobinPath

import { RobinPath } from "@wiredwp/robinpath";
import Module from "@robinpath/office";

const rp = new RobinPath();
rp.registerModule(Module.name, Module.functions);
rp.registerModuleMeta(Module.name, Module.functionMetadata);

const result = await rp.executeScript(`
  office.readDoc "./contract.docx" "text" into $content
`);

Full API Reference

See MODULE.md for complete documentation including all parameters, return types, error handling, and advanced examples.

Related Modules

License

MIT