|
Dim sourceExcelPath,distinctExcelPath
sourceExcelPath="E:\CompareExcel\source-tras\JB4.XLS"
distinctExcelPath="E:\CompareExcel\distinct-bi\JB4分行业总体税负(比率)情况表.xls"
Dim src,srcExcel
Set src=CreateObject("Excel.Application")
Set srcExcel=src.workbooks.open(sourceExcelPath)
Dim dis,disExcel
Set dis=CreateObject("Excel.Application")
Set disExcel=src.workbooks.open(sourceExcelPath)
srcExcel.worksheets("JB4").activate //运行到这行,出错:类不支持 Automation 操作: 'worksheets'
rowcount1=srcExcel.worksheets("JB4").usedrange.rows.count
columncount1=srcExcel.worksheets("JB4").usedrange.columns.count
srcExcel.worksheets("JB4分行业总体税负(比率)情况表").activate
rowcount2=disExcel.worksheets("JB4分行业总体税负(比率)情况表").usedrange.rows.count
columncount2=disExcel.worksheets("JB4分行业总体税负(比率)情况表").usedrange.columns.count
[ 本帖最后由 FLY000 于 2009-7-21 18:53 编辑 ] |
|