怎么样取得EXCEL文件的WorkSheet中最后一个没有内容的行和列它们分别的名称?

panxin 2003-05-16 10:46:10
如题,能给出代码更好!
...全文
10 点赞 收藏 1
写回复
1 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
okjpan 2003-05-16
dim appExcel as Excel.Application
appExcel = CreateObject("Excel.Application")
Dim cWb As Excel.Workbook
appExcel.Workbooks.Open(sFilename)
cWb = appExcel.ActiveWorkbook
Dim cWs As Excel.Worksheet
cWs = cWb.Sheets(1)
Dim cRange As Excel.Range
cWs.Cells(1, 1).value = CStr(cWs.Cells(1, 1).value) + "1"
cRange = cWs.UsedRange
address = cRange.Cells(1, 1).AddressLocal(True, True, Excel.XlReferenceStyle.xlR1C1)
x = Split(address, "C")(0)
x = Microsoft.VisualBasic.Right(x, x.Length - 1)
y = Split(address, "C")(1)
回复
相关推荐
发帖
VB基础类
创建于2007-09-28

7521

社区成员

VB 基础类
申请成为版主
帖子事件
创建了帖子
2003-05-16 10:46
社区公告
暂无公告