Hey everybody, i know that there are already quite similar topics discussing this issue. But non of the solutions there worked for me.
I'm creating a csv file to store an order list and then sending this file per Email. If I open the file with Excel, every entry is in the first column (A1, B1, etc.). But i would like to have them in different columns (A1,A2,A3 and B1,B2,B3 and so on).
My flow:
[{"id":"1e5090de.8827af","type":"tab","label":"Email CSV File","disabled":false,"info":""},{"id":"c56fd571.949928","type":"file","z":"1e5090de.8827af","name":"","filename":"/home/pi/Nachbestellen.csv","appendNewline":true,"createDir":false,"overwriteFile":"true","encoding":"none","x":760,"y":120,"wires":[[]]},{"id":"e55a2b72.801de8","type":"inject","z":"1e5090de.8827af","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":150,"y":120,"wires":[["d2689be4.e882e8"]]},{"id":"d2689be4.e882e8","type":"function","z":"1e5090de.8827af","name":"Column names","func":"msg.payload =['ID','Beschreibung','Menge Pro Kasten','Lieferant','Anzahl pro Bestellnr.','Bestellnummer','Wert','Einheit']\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":370,"y":120,"wires":[["91b7ff4d.78f0e"]]},{"id":"91b7ff4d.78f0e","type":"csv","z":"1e5090de.8827af","name":"","sep":",","hdrin":"","hdrout":"none","multi":"one","ret":"\\n","temp":"","skip":"0","strings":true,"include_empty_strings":"","include_null_values":"","x":550,"y":120,"wires":[["c56fd571.949928"]]},{"id":"90ce83a6.92bf","type":"e-mail","z":"1e5090de.8827af","server":"outlook.office365.com","port":"587","secure":false,"tls":false,"name":"example.email@gmail.com","dname":"","x":1100,"y":360,"wires":[]},{"id":"2f7da25c.da3eae","type":"change","z":"1e5090de.8827af","name":"CSV Datei auswählen","rules":[{"t":"set","p":"attachments","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":680,"y":300,"wires":[["90ce83a6.92bf"]]},{"id":"f2e7989a.b6e5c8","type":"inject","z":"1e5090de.8827af","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":180,"y":300,"wires":[["e77fd275.e38cb"]]},{"id":"e77fd275.e38cb","type":"file in","z":"1e5090de.8827af","name":"","filename":"/home/pi/Nachbestellen.csv","format":"utf8","chunk":false,"sendError":false,"encoding":"utf8","x":420,"y":300,"wires":[["2f7da25c.da3eae"]]},{"id":"1420dc04.5d1754","type":"function","z":"1e5090de.8827af","name":"Email settings","func":"msg.topic = 'Nachbestellung';\nmsg.payload = 'Datei befindet sich im Anhang';\nmsg.attachments = [{filename:'Nachbestellen.csv', path:'/home/pi/Nachbestellen.csv'}];\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":700,"y":420,"wires":[["90ce83a6.92bf"]]},{"id":"71db4105.96927","type":"inject","z":"1e5090de.8827af","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":180,"y":420,"wires":[["1420dc04.5d1754"]]},{"id":"3b48ecb0.1dd564","type":"comment","z":"1e5090de.8827af","name":"Create file and set column names","info":"","x":220,"y":60,"wires":[]},{"id":"929d13b2.4ab32","type":"comment","z":"1e5090de.8827af","name":"Sent Email with attachments. Option 1","info":"","x":260,"y":240,"wires":[]},{"id":"fec19f2f.9b8e1","type":"comment","z":"1e5090de.8827af","name":"Sent Email with attachments. Option 2","info":"","x":250,"y":380,"wires":[]}]
I hope someone can help me.
Best regards.