admin 管理员组

文章数量: 1087135


2024年4月30日发(作者:js舞蹈是正规机构吗)

单元格插入文件 vbs

Module Module1

Sub Main(ByValArgs()As String)

If(=7)Then

Dim excelApp As

ation

Dim excelBook As ok

Dim excelsheet As

eet'定义工作表类

Dim excelPath As String'excel文件路径

Dim insertPath As String'要插入文件的路径

Dim sheetIndex As Integer'sheet页的下标,从1开始

Dim col As Integer'要将文件插入到哪一列

Dim row As Integer'要将文件插入到哪一列行

Dim colCount As Integer'所占的列数

Dim rowCount As Integer'所占的行数

excelPath=Args(0)

insertPath=Args(1)

sheetIndex=Args(2)

col=Args(3)

row=Args(4)

colCount=Args(5)

rowCount=Args(6)

'ine(""+excelPath)

'ine(sheetIndex)

'ine(col)

'ine(row)

'ine(insertPath)

Try

excelApp=GetObject("ation")

yAlerts=False

Catch ex As Exception

ine(""+e)

End Try

If(excelApp Is Nothing)Then

Try

excelApp=CreateObject("ation")

yAlerts=False

Catch ex As Exception

ine(""+

ge)

End Try

End If

If(excelApp Is Nothing)Then


本文标签: 舞蹈 文件 插入 表类 开始