赞
踩
Option Base 1
Option Explicit
Sub main()
On Error GoTo error_handling
Dim wb As Workbook
Dim wb_out As Workbook
Dim sht As Worksheet
Dim sht_out As Worksheet
Dim rng As Range
Dim usedrows As Byte
Dim usedrows_out As Byte
Dim dict_cnum_company As Object
Dim str_file_path As String
Dim str_new_file_path As String
'assign values to variables:
str_file_path = "C:Users12078DesktopPythonCNUM_COMPANY.csv"
str_new_file_path = "C:Users12078DesktopPythonCNUM_COMPANY_OUTPUT.csv"
Set wb = checkAndAttachWorkbook(str_file_path)
Set sht = wb.Worksheets("CNUM_COMPANY")
Set wb_out = Workbooks.Add
wb_out.SaveAs str_new_file_path, xlCSV 'create a csv file
Set sht_out = wb_out.Worksheets("CNUM_COMPANY_OUTPUT")
Set dict_cnum_company = CreateObject("Scripting.Dictionary")
usedrows = WorksheetFunction.Max(getLastValidRow(sht, "A"), getLastValidRow(sht, "B"))
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。