2014-03-04 50 views
0

我有一個應用程序可以創建電子郵件並將其發送給我的團隊。我根據特定的條件動態創建一個HTML表格。然後我使用Outlook HTMLBody方法發送我的電子郵件。電子郵件工作正常。將html表格導出爲ex​​cel表格

用戶現在問我是否可以在電子郵件中創建一個html鏈接來打開顯示相同數據的excel文件。我的問題是有一種快速或簡單的方法來複制我用於我的電子郵件直接使用Excel的HTML表格?

string htmlHeader = "<table style='font-size: 12pt;'><tr><th align='left'>Sedol</th><th>&nbsp;</th>" + 
      "<th align='left'>Name</th><th>&nbsp;</th>"+ 
      "<th align='left'>Ex Date</th><th>&nbsp;</th>" + 
      "<th align='left'>Div Type</th><th>&nbsp;</th>" + 
      "<th align='left'>Div Contribution</th><th>&nbsp;</th>" + 
      "<th align='left'>Div Value GBP (p)</th><th>&nbsp;</th>" + 
      "<th align='left'>Nominals</th><th>&nbsp;</th>" + 
      "<th align='left'>Currency</th><th>&nbsp;</th>" + 
      "<th align='left'>Country of Incorp</th><th>&nbsp;</th></tr>";  

回答

0

由於用戶要求在Excel電子表格中顯示,因此您可以創建一個CSV文件。

相關問題