Modules@robinpath/excel

@robinpath/excel

0.1.0Public

Read, write, and manipulate Excel spreadsheets (.xlsx)

@robinpath/excel

Read, write, and manipulate Excel spreadsheets (.xlsx) with sheets, cells, JSON/CSV conversion

Category Functions Auth License

Why use this module?

The excel module lets you:

  • Read an Excel file into an array of row objects
  • Write an array of objects to an Excel file
  • List all sheet names in an Excel file
  • Add a new sheet with data to an existing Excel file
  • Convert an Excel file to JSON (shortcut for read().rows)

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

Installation

npm install @robinpath/excel

Quick Start

No credentials needed — start using it right away:

excel.write "./output.xlsx" $data {"sheetName": "Users"}

Available Functions

FunctionDescription
excel.readRead an Excel file into an array of row objects
excel.writeWrite an array of objects to an Excel file
excel.readSheetNamesList all sheet names in an Excel file
excel.addSheetAdd a new sheet with data to an existing Excel file
excel.toJsonConvert an Excel file to JSON (shortcut for read().rows)
excel.fromJsonCreate an Excel file from JSON data
excel.toCsvConvert an Excel file to CSV string
excel.getCellGet a specific cell value
excel.setCellSet a specific cell value

Examples

Write an array of objects to an Excel file

excel.write "./output.xlsx" $data {"sheetName": "Users"}

List all sheet names in an Excel file

excel.readSheetNames "./data.xlsx"

Add a new sheet with data to an existing Excel file

excel.addSheet "./data.xlsx" "Summary" $summaryData

Integration with RobinPath

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

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

const result = await rp.executeScript(`
  excel.write "./output.xlsx" $data {"sheetName": "Users"}
`);

Full API Reference

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

Related Modules

License

MIT

Versions (1)

VersionTagPublished
0.1.0latestyesterday
Install
$ robinpath install @robinpath/excel
Version0.1.0
LicenseMIT
Unpacked Size5.1 KB
Versions1
Weekly Downloads0
Total Downloads0
Stars0
Last Publishyesterday
Createdyesterday

Category

productivity