0
길이가 13 자보다 긴 모든 파일 이름을 제거하는 내 AppleScript에 문제가 있습니다. B 열에 파일 이름 목록이 있는데 13 문자 만 필요합니다. 나는 13 개 이상의 행을 지우는 스크립트를 찾고있다. 지금까지는 다소 효과가 있었지만 모두 제거하지는 않았다.AppleScript로 Excel에서 문자 수를 늘리고 제거하십시오
tell application "Microsoft Excel"
activate
open (choose file with prompt "Select the Excel file you wish to use.")
end tell
tell application "Microsoft Excel"
tell active sheet
autofit column "A:H"
end tell
end tell
set cellNumber to 2
tell application "Microsoft Excel"
activate
repeat
set fileName to get value of cell ("B" & cellNumber) as string
set fncount to count characters of fileName
if fncount is greater than 13 then
delete entire row of cell ("B" & cellNumber)
set endCount to 0
else
set endCount to endCount + 1
if endCount > 100 then
exit repeat
end if
end if
set cellNumber to cellNumber + 1
end repeat
end tell
set endCount to 0
정말 고마워요! 그 트릭을 했어! –