找答案的高端用户(找答案钻石及双钻级别的用户)将尽可能从此问题下的所有回
答中,为您推荐最佳答案。届时您可以根据推荐数采纳答案。
如果自提问时间起7天内您仍无法选出最佳答案,您可以选择“无满意答案”关闭此问题。
问题
取消精华
首页精华问答
取消推荐
高端用户推荐
申请置评
已申请置评
修改
修改标签
添加标签
官方认证
取消官方认证
修改标签
添加标签
转移分类
删除
{{itemCategory}}
收藏({{answerDetail.Q_FavoriteCounts}})
手机扫码追踪该问题,
觉得实用,立即去分享!
点击复制链接
专家建议
取消最佳答案
修改
给你个简单的例子,去研究一下吧!
FYI
Dim objXLS 'As Excel.Application
Dim objWSheet 'As Excel.Worksheet
Dim objWBook 'As Excel.Workbook
Dim h 'System Time Hour
Dim row
row=0
Dim tag1
h=CInt(HMIRuntime.Tags("Hour").read)
Set tag1=HMIRuntime.Tags("Pressure")
Set objXLS= CreateObject ("Excel.application")
Set objWBook= objXLS.workbooks.open ("F:\Brizal Program\FGD A DailyReport.xls")
Set objWSheet = objWBook.Worksheets("Sheet1")
'objWSheet.Range("D3:O3").Value =FormatDateTime(Date, 1)
objWSheet.Cells(3, 5).Clear
objWSheet.Cells(3, 5).Value=tag1.Read
objWSheet.Cells(3, 6).Clear
objWSheet.Cells(3, 6).Value=tag1.Read
objWSheet.Cells(3, 7).Clear
objWSheet.Cells(3, 7).Value=tag1.Read
'--------------Format Excel Print Area----------------------------------
Dim mSelection
Set mSelection= objWSheet.Cells
mSelection.select
With mSelection.Borders(7)'xlEdgeLeft
.LineStyle = 2'xlContinuous
.Weight = 2'xlThin
.ColorIndex =&HFFFFEFF7' xlAutomatic
End With
With mSelection.Borders(8)'xlEdgeTop
.LineStyle = 2'xlContinuous
.Weight = 2'xlThin
.ColorIndex = &HFFFFEFF7'xlAutomatic
End With
With mSelection.Borders(9)'xlEdgeBottom
.LineStyle =2' xlContinuous
.Weight = 2'xlThin
.ColorIndex = &HFFFFEFF7'xlAutomatic
End With
With mSelection.Borders(10)'xlEdgeRight
.LineStyle =2' xlContinuous
.Weight = 2'xlThin
.ColorIndex = &HFFFFEFF7'xlAutomatic
End With
With mSelection.Borders(11)'xlInsideVertical
.LineStyle =1' xlContinuous
.Weight = 2'xlThin
.ColorIndex =&HFFFFEFF7' xlAutomatic
End With
With mSelection.Borders(12)'xlInsideHorizontal
.LineStyle =1' xlContinuous
.Weight = 2'xlThin
.ColorIndex = &HFFFFEFF7'xlAutomatic
End With
'--------------Farmat Excel End --------------------------------------
objWBook.SaveAs
objWSheet.PrintOut
'--------------Close Excel WorkBook, Exit Application ----------------
objWBook.Close
Set objWSheet = Nothing
Set objWBook = Nothing
objXLS.Quit
Set objXLS = Nothing
等您来回答
换一换
{{item.CoinValue}}西币
{{item.VisitNum}}人想问
本版相关问题
换一换
专家置评
首次回答问题,获得
双倍西币积分!
立即成为技术知识分享的一员!
欢迎您访问支持中心!
丰富的视频,全方位的文档,大量的网友交流精华……
为了更好的完善这些内容,我们诚邀您在浏览结束后,花20秒左右的时间,完成一个用户在线调查!
感谢您的支持!

西门子商城