.csv report from the Flexy

Hello Tim,

As per what we’ve discussed over the phone, can you please send us information on how to make the Flexy send periodically (eg.: once a day at a specific time) a report in .csv format of a group of variables that have been gathered by the Flexy via Ethernet/IP?

Best Regards,


**Eduardo Giancristofaro
**Sales Manager – Latin America

Hey Eduardo,

I’m just going to write something up real quick

Hey Eduardo,

This code might require a little bit of modification to get working completely right, but this should be a good start for you guys.

These reference guides will also be helpful:
rg-0006-01-en-basic-programming.pdf (758.6 KB)

https://ewonsupport.biz/ebd/

OnDate 1,"* * * * * *", “@tagmail()”
//For this part take a look at the program reference guide on page 78
Function tagmail()

$EmailTo$ = “JohnSmith@email.com
$EmailCC$ = “OtherPerson@email.com
$EmailSubject$ = “Report”

$EmailBody$ = “”
$EmailBody$ = $EmailBody$ + “This is Line 1” + CHR$(13) + CHR$(10) // the CHR$(13) + CHR$(10) is the same as newline
$EmailBody$ = $EmailBody$ + “Line 2” + CHR$(13) + CHR$(10) // Second line of email
$EmailBody$ = $EmailBody$ + “Line 3” + CHR$(13) + CHR$(10) // Third Line of email… ect
$EmailBody$ = $EmailBody$ + "Time: " + TIME$ + CHR$(13) + CHR$(10) // Gives the full date when this was sent

// Want to include data such as graphs as an attachment? see: https://ewonsupport.biz/ebd/

$EmailAttachment$ = “&[$dtHL$ftT$fnreport.csv]”

$EmailContents$ = $EmailBody$ + $EmailAttachment$

Print “Mail Sent”
SENDMAIL $EmailTo$, $EmailCC$, $EmailSubject$, $EmailContents$

ENDFN

One other thing for this is to make sure when you go into your Excel Sheet that you select the column with all the data, then go to:

Data > Text To Columns > Delimited > Hit the Semicolon Check box > General > Finish

This should format the sheet the way you’re expecting

Thanks, Tim!

Best Regards,


**Eduardo Giancristofaro
**Sales Manager – Latin America

Hello Tim,

Thank you very much for the detailed email!

Best Regards,


**Eduardo Giancristofaro
**Sales Manager – Latin America

You’re welcome!

Let me know if you have any questions

Best Regards,
-Tim