900字范文,内容丰富有趣,生活中的好帮手!
900字范文 > 邮件excel html 小数点分隔符在电子邮件(HTML/CSS)在Excel的VBA编程

邮件excel html 小数点分隔符在电子邮件(HTML/CSS)在Excel的VBA编程

时间:2021-05-21 09:53:24

相关推荐

邮件excel html 小数点分隔符在电子邮件(HTML/CSS)在Excel的VBA编程

A B C

1 25,000,000.50

2

3

而下面的VBA代码与内容发送电子邮件单元格A1:

Sub Separators_in_Email()

If ExitAll = False Then

Dim OApp As Object, OMail As Object, signature As String

Set OApp = CreateObject("Outlook.Application")

Set OMail = OApp.CreateItem(0)

With OMail

.display

End With

signature = OMail.HTMLBody

With OMail

.To = "[emailprotected]"

.Subject = "test"

.HTMLBody = "

I want this number " & Sheet1.Range("A1") & " to be shown with its decimal separators as in the Excel sheet

"

End With

Set OMail = Nothing

Set OApp = Nothing

Else

End If

End Sub

电子邮件本身完美的作品。

但是,正如您在Excel电子表格中所看到的,我使用“,”作为小数分隔符。在电子邮件中,不使用这个小数点分隔符。相反,该号码被写为25000000.5而没有“,”。

有没有在VBA或HTML/CSS中显示带有正确小数点分隔符的数字的方法?

-05-30

Michi

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。