Bru*_*uno 2 excel ms-access vba
在下面的代码中,我需要将以行(3)开头的列E&F格式化为货币.谢谢!
Set objApp = CreateObject("Excel.Application")
objApp.Visible = True
Set wb = objApp.Workbooks.Open("template.xls", True, False)
wb.Sheets(1).Rows(3).Delete
wb.Sheets(1).Range("A1").Value = title
'need to format column E & F as currency
Set objApp = Nothing
Run Code Online (Sandbox Code Playgroud)
Range("E:F").NumberFormat = "$#,##0.00"
Run Code Online (Sandbox Code Playgroud)
要么
Range("E:F").SpecialCells(xlCellTypeFormulas).NumberFormat = "$#,##0.00"
Run Code Online (Sandbox Code Playgroud)
要么
Range("E:F").SpecialCells(xlCellTypeConstants).NumberFormat = "$#,##0.00"
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
32726 次 |
| 最近记录: |