#include<excel.au3>
$oexcel=ObjCreate("excel.application")
$oexcel.visible=True
$wb=$oexcel.workbooks.open(@ScriptDir&"\示例.xlsx")
For $ws In $wb.worksheets
With $ws
Sleep(100)
.columns("A:A").delete
Sleep(100)
.columns("C:F").delete
Sleep(100)
.columns("F:O").delete
Sleep(100)
.columns("G:M").delete
Sleep(100)
.columns("H:I").delete
Sleep(100)
.columns("I:R").delete
Sleep(100)
.cells.entirecolumn.autofit
Sleep(100)
.columns("C:C").columnwidth=22
Sleep(100)
.range("A1:H10001").removeduplicates&"columns&:=Array(4,7),_header:=.xlyes";遇到的问题就是怎么样根据“日志时间”和“目标地址”去重复(EXCEL宏命令的原话是这样但是无法直接调用来使用)
EndWith
Next
|