Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

197
Vistas
How to save a second file if there are more than 65000 rows in excel when exporting - XLSX

I want to download all the information stored in my database (Firebase) into an Excel sheet through my API.

Right now I have +2000 rows of information and it works fine. I understand that now excel's limitations are beyond 65000 rows but just in case to avoid any inconvenience later on. How can I divide all my information into a second spreadsheet if I have more than 65000 chunks of info?

This is the library I'm using https://www.npmjs.com/package/xlsx

And here is my code:

downloadPlans() {
  var wb = XLSX.utils.book_new();
  wb.SheetNames.push("Plans");

  var ws_data = [
    [
      "name",
      "productType",
      "onCreated",
      "tags",
      "catalog",
      "state",
      "brand",
      "code",
      "sqf",
      "width",
      "depth",
      "category",
      "stories",
      "bedrooms",
      "fullBaths",
      "halfBaths",
      "garage",
      "garageLocation",
      "garageType",
      "garageBays",
      "bedroomLocation",
      "laundryLocation",
      "description",
      "region",
    ],
    ...this.planCategory.map((plan) => [
      plan.name,
      plan.productType,
      plan.onCreated,
      plan.tags.join(","),
      plan.catalog,
      plan.state,
      plan.brand,
      plan.code,
      plan.sqf,
      plan.width,
      plan.depth,
      plan.category,
      plan.stories,
      plan.bedrooms,
      plan.fullBaths,
      plan.halfBaths,
      plan.garage,
      plan.garageLocation,
      plan.garageType,
      plan.garageBays,
      plan.bedroomLocation,
      plan.laundryLocation,
      plan.description,
      plan.region,
    ]),
  ];

  var ws = XLSX.utils.aoa_to_sheet(ws_data);
  wb.Sheets["Plans"] = ws;

  var wbout = XLSX.write(wb, {
    bookType: "xlsx",
    type: "binary",
  });

  function s2ab(s: string) {
    var buf = new ArrayBuffer(s.length);
    var view = new Uint8Array(buf);
    for (var i = 0; i < s.length; i++) view[i] = s.charCodeAt(i) & 0xff;
    return buf;
  }
  FileSaver.saveAs(
    new Blob([s2ab(wbout)], { type: "application/octet-stream" }),
    "Plans.xlsx"
  );
  
},
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda