阳光网驿-企业信息化交流平台【DTC零售连锁全渠道解决方案】

 找回密码
 注册

QQ登录

只需一步,快速开始

扫描二维码登录本站

手机号码,快捷登录

老司机
查看: 2222|回复: 0

[讨论] 有没有朋友结合勤哲excel服务器,对wps表格进行二次开发的?

[复制链接]
  • TA的每日心情
    开心
    2019-5-16 10:41
  • 签到天数: 10 天

    [LV.3]偶尔看看II

    发表于 2008-4-7 12:28:40 | 显示全部楼层 |阅读模式
    大家一起探讨下可行性

    启动excel改成启动wps表格
    excel.vbs
    Dim oShell
    Set oShell = CreateObject ("WSCript.shell")
    oShell.run "et"
    set oShell=nothing


    ESFunc.xla

    Public es_sShapeName As String  '当前选中的图形对象名称
    Public Function ESF_newId(ByVal idName As String, _
        Optional ByVal whenSave As Boolean = False, _
        Optional A1 As String = "") As String
       Dim oAdd As Object
       Set oAdd = Application.COMAddIns.Item("ESClient.Connect").Object
       ESF_newId = oAdd.ESF_newId(idName, whenSave)
    End Function
    Public Function ESF_MnyToCap(ByVal x As Double) As String
       Dim oAdd As Object
       Set oAdd = Application.COMAddIns.Item("ESClient.Connect").Object
       ESF_MnyToCap = oAdd.ESF_MnyToCap(x)
    End Function
    Public Function ESF_selectShape(x) As String
        If x = "" Then Exit Function
        Dim oAdd As Object
       
        Set oAdd = Application.COMAddIns.Item("ESClient.Connect").Object
        ESF_selectShape = oAdd.ESF_selectShape(x)
    End Function
    Public Function ESF_getFldValue( _
        ByVal tabName As String, _
        ByVal flds As String, _
        ParamArray keys()) As Variant
        Dim oAdd As Object
        Dim sFld As String
        Dim i As Integer, n As Integer
        If Not IsArray(keys) Then
            ESF_getFldValue = ""
            Exit Function
        End If
        n = UBound(keys)
       
        For i = 0 To n
            If i = 0 Then
                sflds = keys(i)
            Else
                sflds = sflds & "," & keys(i)
            End If
        Next
        Set oAdd = Application.COMAddIns.Item("ESClient.Connect").Object
        ESF_getFldValue = oAdd.ESF_getFldValue(tabName, flds, sflds)
        Set oAdd = Nothing
    End Function
    Public Function ESF_Combine(rng As Range, Optional ByVal split As String = ",") As String
        Dim oAdd As Object
        Set oAdd = Application.COMAddIns.Item("ESClient.Connect").Object
        ESF_Combine = oAdd.ESF_Combine(rng, split)
        Set oAdd = Nothing
    End Function
    Public Sub ESF_SaveReport()
        Dim oAdd As Object
        Set oAdd = Application.COMAddIns.Item("ESClient.Connect").Object
        oAdd.saveCase
        Set oAdd = Nothing
    End Sub

    [ 本帖最后由 花提笑 于 2008-4-7 15:43 编辑 ]
    楼主热帖
    启用邀请码注册,提高发帖质量,建设交流社区
    您需要登录后才可以回帖 登录 | 注册

    本版积分规则

    快速回复 返回顶部 返回列表