Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-red-contrib-excelsheets

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-red-contrib-excelsheets - npm Package Compare versions

Comparing version 1.0.3 to 1.0.5

examples/basic w server.json

2

examples/basic.json

@@ -1,1 +0,1 @@

[{"id":"74afde7d.c4af","type":"tab","label":"Excel Sheets Test","disabled":false,"info":""},{"id":"52875c48.e40184","type":"function","z":"74afde7d.c4af","name":"example data","func":"msg.payload = [{\n header: {\n 'author': 'authorName',\n 'title': 'title'\n },\n items: [\n {\n author:'john',\n title:'how to use this'\n },\n {\n author:'Bob',\n title:'so Easy'\n }\n ],\n sheetName: 'sheet1',\n },\n {\n header: {\n 'a': 'AAAAA',\n 'b': 'BBBBB'\n },\n items: [\n {\n a:'a',\n b:'b'\n },\n {\n a:'aa',\n b:'bb'\n }\n ],\n sheetName: 'sheet2',\n }];\nmsg.filepath = msg.home + 'j2x.xlsx';\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":340,"y":180,"wires":[["49cc85d5.30bfdc"]]},{"id":"b5991ac3.af95e8","type":"inject","z":"74afde7d.c4af","name":"","props":[{"p":"home","v":"HOME","vt":"env"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":140,"y":180,"wires":[["52875c48.e40184"]]},{"id":"49cc85d5.30bfdc","type":"excelsheets","z":"74afde7d.c4af","name":"","file":"","x":550,"y":180,"wires":[[]]}]
[{"id":"74afde7d.c4af","type":"tab","label":"Excel Sheets Test","disabled":false,"info":""},{"id":"52875c48.e40184","type":"function","z":"74afde7d.c4af","name":"example data","func":"msg.payload = [{\n header: {\n 'author': 'authorName',\n 'title': 'title'\n },\n items: [\n {\n author:'john',\n title:'how to use this'\n },\n {\n author:'Bob',\n title:'so Easy'\n }\n ],\n sheetName: 'sheet1',\n },\n {\n header: {\n 'a': 'AAAAA',\n 'b': 'BBBBB'\n },\n items: [\n {\n a:'a',\n b:'b'\n },\n {\n a:'aa',\n b:'bb'\n }\n ],\n sheetName: 'sheet2',\n }];\nmsg.filepath = msg.home + '/output.xlsx';\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":340,"y":80,"wires":[["49cc85d5.30bfdc"]]},{"id":"b5991ac3.af95e8","type":"inject","z":"74afde7d.c4af","name":"","props":[{"p":"home","v":"HOME","vt":"env"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"str","x":140,"y":80,"wires":[["52875c48.e40184"]]},{"id":"49cc85d5.30bfdc","type":"excelsheets","z":"74afde7d.c4af","name":"","file":"","x":550,"y":80,"wires":[[]]},{"id":"ea4692bb.bbd57","type":"function","z":"74afde7d.c4af","name":"Set base path","func":"var basePath = msg.home + \"/\";\nvar filename = msg.req.params.fn;\n\n\nif(filename.includes(\"..\\\\\")){\n msg.payload = \"Illegal file path\";\n msg.statusCode = 405;//not allowed\n return [null, msg];//fire output 2\n} else if(filename.includes(\"../\")){\n msg.payload = \"Illegal file path\";\n msg.statusCode = 405;//not allowed\n return [null, msg];//fire output 2\n} \n//TODO: add more checks\n\nmsg.filename = basePath + filename;\nreturn [msg, null];//fire output 1\n\n\n","outputs":2,"noerr":0,"initialize":"","finalize":"","x":300,"y":220,"wires":[["ebbbf5aa.230848"],["1e184040.ac379"]]},{"id":"ebbbf5aa.230848","type":"file in","z":"74afde7d.c4af","name":"","filename":"","format":"","chunk":false,"sendError":false,"encoding":"none","x":490,"y":200,"wires":[["1e184040.ac379","a86330e4.57bc4"]]},{"id":"1e184040.ac379","type":"http response","z":"74afde7d.c4af","name":"","statusCode":"","headers":{},"x":650,"y":240,"wires":[]},{"id":"c47b1263.ed3f3","type":"http in","z":"74afde7d.c4af","name":"","url":"/files/:fn","method":"get","upload":false,"swaggerDoc":"","x":110,"y":180,"wires":[["6b3cece5.b59724"]]},{"id":"a86330e4.57bc4","type":"debug","z":"74afde7d.c4af","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":670,"y":200,"wires":[]},{"id":"4a99884d.b8a048","type":"function","z":"74afde7d.c4af","name":"Set 404","func":"msg.payload = msg.error;\nmsg.statusCode = 404;//resource not found\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":500,"y":260,"wires":[["1e184040.ac379"]]},{"id":"f7539a2b.5b5438","type":"catch","z":"74afde7d.c4af","name":"","scope":["c47b1263.ed3f3","ea4692bb.bbd57","ebbbf5aa.230848"],"uncaught":false,"x":110,"y":260,"wires":[["4a99884d.b8a048","14d39f53.1ed431"]]},{"id":"14d39f53.1ed431","type":"debug","z":"74afde7d.c4af","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":270,"y":280,"wires":[]},{"id":"6b3cece5.b59724","type":"change","z":"74afde7d.c4af","name":"read: env HOME","rules":[{"t":"set","p":"home","pt":"msg","to":"HOME","tot":"env"}],"action":"","property":"","from":"","to":"","reg":false,"x":310,"y":180,"wires":[["ea4692bb.bbd57"]]}]
{
"name": "node-red-contrib-excelsheets",
"version": "1.0.3",
"version": "1.0.5",
"description": "writes multi-sheet excel files",

@@ -5,0 +5,0 @@ "scripts": {

@@ -33,13 +33,14 @@ # node-red-contrib-excelsheets

] ,
filename: "output.xlsx"
filepath: "output.xlsx"
```
# Change Log
1.0.0 - Original version, forked from "node-red-contrib-excel" and swapped out a different dependency.
1.0.1 - Cleanup.
1.0.2 - Cleanup and documentation.
1.0.3 - Cleanup and documentation.
## Change Log
* 1.0.5 - Updated docs to refer to correct msg property: filepath (not filename, )
* 1.0.4 - Additional Example "basic w server". Cleanup and documentation.
* 1.0.1 ~ 3 - Cleanup and documentation.
* 1.0.0 - Original version, forked from "node-red-contrib-excel" and swapped out a different dependency.
# TODO
[ ] - Digging deeper into the dependencies, there's a really powerful package called "xlsx" (npmjs.com)[https://www.npmjs.com/package/xlsx] that has a rich base of features, I would like to create a node that uses everything available.
[ ] - Come up with a few examples that do something more interesting
## TODO
- [ ] Give richer status feedback / error feedback
- [ ] Digging deeper into the dependencies, there's a really powerful package called "xlsx" [<npmjs.com>](https://www.npmjs.com/package/xlsx) that has a rich base of features, I would like to create a node that uses everything available.
- [ ] Come up with a few examples that do something more interesting

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc