views:

30

answers:

1

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...?

+1  A: 

Something like this might work:

excelWorkSheet.Hyperlinks.Add(excellApp.Cells[row, 14], "mailto:[email protected]", Type.Missing, "Someones Mail", Type.Missing);  
ho1
Unfortunately it works only in a half coz i get the hyperlink to the email client in excel, but the field has the "mailto:" text also...
shin
ok it worked in next line I just did:((Microsoft.Office.Interop.Excel.Range)excellApp.Cells[row, 16]).Value2 = client.Email;and it remembered from the previous line that this was an mailto field ;)
shin