.net - C#: copy range of cells from excel sheet and paste in HTML email body -
i have excel sheet. data pretty straight forward in few columns , rows. there formatting done on cells (example.. colors, bold font, etc). using c# send email. wish copy contents of excel sheet , paste in body of email formatting maintained.
is possible? talking bs?
that's not easy one. mean have check style of every character in every cell! wouldn't easier send excel sheet? if provide more information why doing might able suggest alternatives won't time consuming!
edit:
the easiest use workbook.sendmail() method.
the code:
excel.workbook myworkbook = xlapp.workbooks["book1.xls"];` string recipients = "elvispresley@gmail.com"; string subject = "no need open attachment, lazy ****"; bool returnreceipt = false; myworkbook.sendmail(recipients, subject, returnreceipt); note recipients parameter typed system.object argument passed in can string[] if have multiple recipients.
Comments
Post a Comment