I'm trying to use JSL to send emails as part of a data retrieval query. How do I embed a data table or Journal table into the body of my text message?
Thanks
Hi, this is the print screen...I think the issue might be the fact that I am not using Outlook as the email client, I am using Mailbird. Will try to configure Outlook and update
Hi. is there a way the alignment per column be fixed? or if i could change the default font style used in this HTML email, cause it seems that the column is not align due to the letters in the default font style(arial) used takes different space per letter(like "I" has different space than "M"). so is there a way to change the font style or any other suggestion how to fix the alignment per column. thank you.
Hi @lalala ,
Not sure if there is a way to do it with the commands that were listed previously in this thread. The text is just tab-delimited and you can edit it in the email. I am not aware of any commands to modify this when sending the table as text
However, there is a possible workaround that might suit your needs. You have to get the data table report as a picture, save it, and then send it as an attachment. It will look like the data table format in JMP report windows.
Names Default To Here( 1 );
Open( "$SAMPLE_DATA/Big Class.jmp" );
dt = Data Table( "Big Class" );
path="your path\"; //be sure to have the last backslash included in this.
tb=dt<<Get As Report();
tb<<Get Picture();
tb<<Save Picture(path||"pic.png", "png");
Mail("my.email@email.com", "dt names", "The data is \!n", path||"pic.png");
You can of course save the picture in different formats than png.
The attachment will look like this:
Not ideal, but the data will be formatted and aligned as desired. It won't be editable or copy/pastable like the text email version. Perhaps you can put in a request to JMP to have them provide more options for the Get Text() command so it can provide more complex formatting options?
Hope this helps!,
DS
hi. Thank you for your quick response.
But, I would like to ask again, could there be a possibility that I could attach the photo to the mail's body? Thank you in advance.
Hi, it was indeed the email client. I uninstalled Mailbird and used Outlook and worked fine...
Thank you for your help!
Hi DS,
Is it possible to to send picture in the email body (not attachment) and at the same time attach a table? The Eval () and get text not working for picture
Hi @dadawasozo ,
Not that I'm aware of, I believe you can only add it as an attachment, not within the body of the email. I think it can only handle text in the email.
DS