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