Numbers + Node.js + JavaScript : How do I access a numbers document
Hello,
I have a Javascript that allows me to read a CSV file. It does so via functionality provided by Node.js. Now I would like to add functionally that allows me to access a Numbers file. In Apple's Script Editor the following works (less the ability to access a CSV file) along with regular JavaScript to read and write to cells:
let Numbers = Application("Numbers");
let allHistory = Numbers.documents[0].sheets[1].tables["All History"];
let principalData = Numbers.documents[0].sheets[2].tables["Principal"];
Now that I am using Node.js for CVS file access the above code does not work. The error is "Application (first line) is not recognized".
Is there a way to access a Numbers file thru Node.js? Or do I need to approach this problem in a different way?
Chris
iMac 27″, macOS 11.4