简体   繁体   中英

C# exporting e-mails to excel on widndows forms using microsoft.office.interop.excel

I need to export some data to excel in my forms aplication, so i used microsoft.office.interop.excel and everything is ok except one thing. When exporting client's email I would like to make it an mailto: link.

excellApp.Cells[row, 16] = "mailto:"+client.Email;

doesn't work

When I add hiperlink when exporting www field it looks like this:

excelWorkSheet.Hyperlinks.Add(excellApp.Cells[row, 14], client.Www, Type.Missing, Type.Missing, Type.Missing);

How can I export an email to have similar effect coz right now I have only simple fields without any action...?

这样的事情可能会起作用:

excelWorkSheet.Hyperlinks.Add(excellApp.Cells[row, 14], "mailto:youremail@test.com", Type.Missing, "Someones Mail", Type.Missing);  

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM