简体   繁体   English

C#使用microsoft.office.interop.excel在widndows表单上将电子邮件导出到excel

[英]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. 我需要将一些数据导出到表格应用程序中的excel中,所以我使用了microsoft.office.interop.excel,除了一件事情之外,其他一切都OK。 When exporting client's email I would like to make it an mailto: link. 导出客户的电子邮件时,我想将其设置为mailto:链接。

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

doesn't work 不起作用

When I add hiperlink when exporting www field it looks like this: 当我在导出www字段时添加hiperlink时,它看起来像这样:

excelWorkSheet.Hyperlinks.Add(excellApp.Cells[row, 14], client.Www, Type.Missing, Type.Missing, Type.Missing); 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);  

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用 Microsoft.Office.Interop.Excel SaveAs 错误导出到 .xlsx - Exporting to .xlsx using Microsoft.Office.Interop.Excel SaveAs Error COMException C#Microsoft.Office.Interop.Excel - COMException C# Microsoft.Office.Interop.Excel C#MergeArea错误Microsoft.office.interop.excel - C# MergeArea Error Microsoft.office.interop.excel C# microsoft.office.interop.excel 添加图表 - C# microsoft.office.interop.excel Add Chart C#使用Microsoft.Office.Interop.Excel读取Excel单元格值 - C# reading Excel cell values using Microsoft.Office.Interop.Excel 使用 C# 中的 Microsoft.Office.Interop.Excel 从 excel 读取大量数据 - reading huge data from excel using Microsoft.Office.Interop.Excel in C# 如何在 C# 中使用 Microsoft.Office.Interop.Excel 在 Excel 中的矩形内写入文本 - How to write a text inside a rectangle in excel using Microsoft.Office.Interop.Excel in c# 如何在不使用 Microsoft.Office.Interop.Excel 库的情况下在 C# 中读取 excel 文件 - How to read an excel file in C# without using Microsoft.Office.Interop.Excel libraries C# 使用 Microsoft.Office.Interop.Excel 错误设置范围 .Formula 到范围 .Value2 - C# Using Microsoft.Office.Interop.Excel Error Setting Range .Formula to Range .Value2 使用Microsoft.Office.Interop.Excel将数据集导出到xlsx - Exporting dataset to xlsx with Microsoft.Office.Interop.Excel
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM