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

spreadsheets-dropzone

v1.0.0

Published

React Component to Drag and Drop Excel or CSV Files into Browser

Readme

spreadsheets-dropzone

React drag-and-drop component that reads spreadsheet file(s) and outputs structured arrays of spreadsheets.

Install

npm install spreadsheets-dropzone

Usage Typescript

import { SpreadsheetsDropZone } from "spreadsheets-dropzone";
import { FolderType } from "spreadsheets-reader/dist/tsc/types";
import {
  uploadMessage,
  hoverTip,
  colors,
  emptyZoneStyle,
  loadedZoneStyle,
  parentFontSize,
} from "./defaultsForOptionalProps";

function App() {
  const handleData = (data: FolderType) => {
    console.dir(data);
  };

  return (
    <SpreadsheetsDropZone
      handleSpreadsheetsData={handleData} //required
      uploadMessage={uploadMessage}
      hoverTip={hoverTip}
      parentFontSize={parentFontSize}
      colors={colors}
      yesFilesStyle={loadedZoneStyle}
      noFilesStyle={emptyZoneStyle}
    />
  );
}

export default App;

defaultsForOptionalProps.js

optional props are show below containing their default values

export const uploadMessage = "Add Spreadsheet Files Here";
export const hoverTip = "Drag-drop or Click to upload Excel or CSV File(s).";
export const parentFontSize = "14px";

export const colors = {
  blue: "rgb(214, 241, 255)",
  red: "rgb(247, 160, 114)",
  white: "rgb(249, 247, 243)",
  lightGrey: "rgb(226, 224, 221)",
  mediumGrey: "rgb(130, 128, 126)",
  darkGrey: "rgb(67, 66, 65)",
  black: "rgb(31,30,29)",
};

export const emptyZoneStyle = {
  backgroundColor: colors["white"],
  opacity: "100",
  border: `1px dashed ${colors.darkGrey}`,
  borderRadius: "4%",
};

export const loadedZoneStyle = {
  backgroundColor: colors["blue"],
  opacity: "100",
  border: `1px dashed ${colors.darkGrey}`,
  borderRadius: "5px",
};

The structured output is an array that contains one for each file uploaded. Each file is an array of 'sheet' objects with filename, sheetname and data attribues.

Compatible with many spreadsheet filetypes

.xlsx .xls .xlsb .csv .ods

output

myFile.xlsx with two sheets

[
  [
    {
      "filename": "myFile.xlsx"
      "sheetname": "Sheet1",
      "data": [
        {
          "col1": "10",
          "col2": "a",
          "col3": "d",
        },
        {
          "col1": "20",
          "col2": "b",
          "col3": "e",
        },
      ],
    },
    {
      "filename": "myFile.xlsx"
      "sheetname": "Sheet2",
      "data": [
        {
          "colA": "1",
          "colB": "a",
          "colC": "d",
          "colD": "g"
        },
        {
          "colA": "2",
          "colB": "b",
          "colC": "e",
          "colD": "h"
        },
      ],
    }
  ]
]

data attribute is d3-dsv's type DSVRowArray