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 🙏

© 2025 – Pkg Stats / Ryan Hefner

rs-excel

v1.0.4

Published

Librería ligera para exportar datos a Excel (.xlsx) con filtros, autoajuste y múltiples hojas. Sin dependencias externas en runtime.

Readme

RSExcel

License Version Size

RSExcel es una librería ligera para exportar datos a Excel (.xlsx) desde el navegador, con soporte para: Donar

  • Formato de celdas (fechas, moneda, porcentajes)
  • Números de fila y totales
  • Exportar desde una tabla HTML
  • Filtros y autoajuste
  • Múltiples hojas
  • Sin dependencias externas en runtime (todo en un solo archivo)
  • 100% compatible con la versión gratuita de SheetJS

Ideal para aplicaciones web que requieren reportes profesionales con formato avanzado.


🚀 Instalación

Opción 1: Descarga directa (recomendado para frontend puro)

  1. Descarga rs.excel.min.js (después de construir el proyecto)
  2. Inclúyelo en tu HTML:
<script src="rs.excel.min.js"></script>

Opción 2: Como módulo (con bundler)

npm install rs-excel
o
import RSExcel from 'rs.excel.min';

🧪 Ejemplo de uso

▶️ Una sola hoja (simple)

RSExcel.exportToExcel(
    [['Nombre', 'Edad'], ['Ana', 28]],
    'usuarios.xlsx',
    'Hoja1'
);

▶️ Múltiples hojas (avanzado)

const libro = new RSExcel.Workbook();

libro
  .addSheet('Usuarios', [['Nombre', 'Edad'], ['Ana', 28]], {
    headerStyle: { font: { bold: true, color: '#FFFFFF' }, fill: '#2C3E50' }
  })
  .addSheet('Productos', [['Producto', 'Precio'], ['Laptop', 1200]], {
    headerStyle: { font: { bold: true }, fill: '#3498DB' }
  })
  .download('reporte.xlsx');

🎨 Auto ajustable y filtros

RSExcel.exportToExcel(data, filename, sheetName, {
   autoFit: true,
   enableFilters: true
});

🧪 Ejemplo de uso con nuevas funcionalidades

const data = [
  { nombre: 'Ana', edad: 28, salario: 1200, fecha: new Date('2023-01-15') },
  { nombre: 'Luis', edad: 34, salario: 1500, fecha: new Date('2023-03-22') }
];

const columns = [
  { key: 'nombre', title: 'Nombre' },
  { key: 'edad', title: 'Edad', decimals: 0 },
  { key: 'salario', title: 'Salario', format: 'currency' },
  { key: 'fecha', title: 'Fecha de Ingreso', type: 'date' }
];

// ✅ Exportar con formato, filtros, autoajuste y totales
RSExcel.exportToExcel(data, columns, 'empleados.xlsx', 'Empleados', {
  exportWithRowNumbers: true,
  summary: {
    label: 'Total',
    values: [null, null, 2700, null] // suma de salarios
  }
});

//▶️ Exportar desde una tabla HTML
RSExcel.exportTableToExcel('#mi-tabla', 'archivo.xlsx', 'Hoja1', {
  autoFit: true,
  enableFilters: true
});

⚠️ Notas importantes

Basado en SheetJS [email protected] (versión gratuita, Apache 2.0).
No requiere internet en runtime.

⚖️ Licencia

RSExcel: MIT License © Rogelio Urieta Camacho (RojeruSan)
SheetJS (xlsx): incluido bajo Apache License 2.0

🙌 Autor

Rogelio Urieta Camacho (RojeruSan)
Hecho con ❤️ para desarrolladores que aman el control total sobre sus exportaciones.