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 🙏

© 2024 – Pkg Stats / Ryan Hefner

other-excel

v0.0.1

Published

otherExcelJS is a library for working with excel. including xls reading and writing.

Downloads

12

Readme

other-excel

other-excel is a library for working with excel. including xls reading and writing.

PS:Exporting xls is not supported yet

Special Notes

Inspired by xlsx, some of the source code was copied directly from xlsx

The reason for all the rewrites is that the community version of xlsx is not going to be updated anymore, and also the API for xlsx is really unfriendly and costly to use, as well as the readability of the source code is not good. So use TS to rewrite it, and the API is designed and returned more friendly.

Contents

Install

npm/yarn/pnpm install other-excel

Examples


use commonjs:

const OtherExcel = require('other-excel').default;

//decrypt a file with a password
(async ()=>{
        const otherExcel = new OtherExcel();
        const workbook = await otherExcel.read('./test.xls');

        Get sheetNames:
        workbook.sheetNames -> ['Sheet1', 'Sheet2', 'Sheet3']

        Get index to get worksheet:
        const worksheet = workbook.getWorksheet(0);

        Get the name of the worksheet:
        const worksheet = workbook.getWorksheet('Sheet1');

        Get the contents of a cell in a row:
        const row = worksheet.getRow(0);  // Subscript 0 indicates row 1 

        Getting the contents of certain lines: 
        const rows = worksheet.getRows(0, 2);  // Get the contents of rows 1 through 3

        Get the contents of a cell in a col:
        const col = worksheet.getColumn(0);  // Subscript 0 indicates row 1 
        const col = worksheet.getColumn('A');  // A indicates row 1 

        Getting the contents of certain lines: 
        const cols = worksheet.getColumns(0, 2);  // Get the contents of cols 1 through 3

        Get the contents of a cell directly:
        const cell = worksheet.getCell('A1');
        const cell = worksheet.getCell(0, 0);

        There are many more attributes that can be viewed directly in the .d.ts declaration file...

})()

PRs are welcome!

Tests

With Jest:

pnpm i 
pnpm run test

Todo

  • [x] Add tests
  • [x] Supports reading of more attributes
  • [x] Support for xls file export

Resources