sendolmail a cell array?
3 次查看(过去 30 天)
显示 更早的评论
Does anyone know how to send a variable (cell array) using sendolmail(outlook version of sendmail) or sendmail?
So in the email body, receivers could get
'Security' 'Name' 'Quantity' 'Price'
'F2TEZ3-13' 'Fr Tel div DEC3' [ 2000] [ 0.8800]
'SNDZ2-13' 'NIKKEI DIV DEC12' [ 500] [ 188.3000]
'T2QIZ2-12' 'Tel Itl div DEC2' [ -1000] [ 0.0500]
'R2WEZ2-12' 'RWE div DEC2' [ 150] [ 2.0060]
'FEXDZ3-13' 'ESTX 50 Div DEC3' [ 1412] [ 105.8000]
'FEXDZ2-12' 'ESTX 50 Div DEC2' [ 250] [ 117.8000]
'E2NLZ2-12' 'ENEL div DEC2' [ -1100] [ 0.1500]
'S2SDZ2-12' 'Santand div DEC2' [ 3510] [ 0.5400]
'FEXD1000X3.EX-13' 'OEXD DEC3 100 P' [ 1400] [ 5.8600]
'B2NPZ2-12' 'BNP Par div DEC2' [ -325] [ 1.2000]
Thanks in advance !
0 个评论
采纳的回答
Walter Roberson
2012-2-22
You would have to serialize the cell array and send it as an attachment.
Unfortunately the MATLAB serialization routines have no user interface, so you end up having to write your own serialization routines.
Sometimes the easiest thing to do is to save the cell array as a .mat file and attach the .mat file.
更多回答(1 个)
Jan
2012-2-22
sendolmail expects the attachments to be filenames, and not the actual data. So you have to use save at first and supply the name of the created file.
m = {'Security', 'F2TEZ3-13', 'SNDZ2-13', ...
save('m_as_MatFile.mat', 'm');
sendolmail('qzhang', 'Exposure', 'Thanks!', {'m_as_MatFile.mat'})
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spreadsheets 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!