Initial commit, 90% there

This commit is contained in:
mdares
2025-12-02 16:27:21 +00:00
commit 755028af7e
7353 changed files with 1759505 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
module.exports = function(RED) {
const XLSX = require('xlsx');
function CellNode(config) {
RED.nodes.createNode(this,config);
var node = this;
node.on('input', function(msg) {
var address = config.address || msg.selectAddress;
delete msg.selectAddress;
if (!address) {
return node.error(RED._("cell.errors.no-address"));
} else if (!/[A-Z]+[1-9][0-9]*/.test(address)) {
return node.error(RED._("cell.errors.invalid-address") + ": " + address);
}
var cell = msg.payload && msg.payload[address];
msg.payload = cell && config.dataType
? cell[config.dataType]
: cell;
msg.selectedAddress = address;
node.send(msg);
});
}
RED.nodes.registerType("cell",CellNode);
}