楼上的回了等于没回,太不厚道了!
建立:
EXCEL: Open File(num1) & "" & "ID.xls" For Append As #1
Close #1
打开: EXCEL:Set newbook1 = newXls.Workbooks.Open(File(num1) & "" & "ID.xls")
保存: newbook1.Save
关闭: newbook1.Close 0
操作:xlsheet.Activate
For row1 = 1 To row_number - 1
Rows("1:1").Select
‘选择行
'
Range(o - 1).Activate
Selection.Delete Shift:=xlUp ‘删除行
Next
Columns("A:A").Select ‘选择列
Selection.TextToColumns Destination:=Range("A1"), DataType:=xlFixedWidth, _
FieldInfo:=Array(Array(0, 1), Array(8, 1), Array(24, 1), Array(33, 1), Array(41, 1), _
Array(49, 1)), TrailingMinusNumbers:=True
‘筛选
建议录制宏
Columns("E:E").Select
Selection.AutoFilter
Selection.AutoFilter Field:=1, Criteria1:="10", Operator:=xlTop10Items
ActiveWorkbook.Save
ActiveSheet.Columns("A:F").Select
‘选择多行
Selection.Copy
‘复制行