Showing results for 
Search instead for 
Did you mean: 

Saving and mailing tables as different tabs in One excel file

New Contributor
I want to save different tables as different tabs with table names as tab names into one single excel and mail the file.
Please help.

New Contributor II

h:hopen `:test.xls;

neg[h] raze .h.edsn `mySheetOne`mySheetTwo!(([] col1:`a`b`c;col2:1 2 3);([] colA:9 8 7;colB:5 6 7));

hclose h;

For mailing, it has to be done by the OS so it depends on your OS and what you have installed on your OS. For example, using mailx on linux, something like this might work:

sendMailAttach:{@[system;"mailx -s \"",y,"\" ",z," < ",x;{-1"Failed to send email - ",x}]};


I was just going through my old mails. Forgot to reply that this worked.
Though i had used mutt to send the attachment as there was some issue with the mailx part.
Really appreciate the help and thanks a lot.

Abhishek Singh

No problem, glad it worked.

Can you give details of your mutt solution? out of curiosity


Instead of using mailx call from system, we call mutt.
We find mutt easier to attach files.