后续有没计划开发针对wps的 Excel 区域操作?强烈需求

使用问题 · 11 次浏览
Qiu Cool 创建于 1天14小时前

office Excel虽然好用,但不便分享、协作、上云,在国内大势已去,希望能针对wps做些适配

 


回复内容
CL 23小时26分钟前
#1

用office 软件辅助里运行vba实现,有的wps在安装组件以后支持vba

Qiu Cool 回复 CL 17小时18分钟前 :

确实可以




' 功能:返回当前工作表名称
Function GetCurrentSheetName() As String
    Dim rng As Range
    Set rng = Selection
    On Error Resume Next
    
        ' 返回选中单元格所在工作表名称
        GetCurrentSheetName = rng.Worksheet.Name
    
    On Error GoTo 0
End Function


▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰

' 功能:返回当前选中单元格区域
Function GetSelectedCellPosition() As String
    Dim rng As Range
    ' 将选中区域赋值给变量
    Set rng = Selection
    On Error Resume Next
        ' 单个单元格:返回绝对地址(格式:$A$1)
        GetSelectedCellPosition = rng.Address
    
    On Error GoTo 0
End Function


回复主贴