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

140
Vistas
Accessing an Apple Numbers with JavaScript run thru Node.js

I have a JavaScript that works with tables in an Apple Numbers spreadsheet when run from Apples script editor. I needed to add file reading functionality to the script so I moved to Visual Studio Code and Node.js. The file reading now works but this line: let Numbers = Application("Numbers"); now kicks out an error "Application is not defined". Is there a package I need to install via npm or some other syntax I need to utilize to make this script work?

Chris

Below is the beginning of my code:

let Numbers = Application("Numbers");

let allHistory = Numbers.documents[0].sheets[1].tables["All History"];

let principalData = Numbers.documents[0].sheets[2].tables["Principal"]; 

const readline = require('readline');
const fs = require('fs');

let tempArray = [];
const principalDateArray = [];
const principalValueArray = [];

let rl = readline.createInterface({

    input: fs.createReadStream('../CSV/largecap.csv')

});

rl.on('line', function(line) {

    tempArray = line.split(',');
    principalDateArray.push(tempArray[0]);
    principalValueArray.push(tempArray[1]);

});

let arrayLength = principalDateArray.rows.Length;

for(let i = 0; i < arrayLength; i++){

    principalData.rows[i].cells[2].value = principalDateArray[i];
    principalData.rows[i].cells[3].value = principalValueArray[i];    

}
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