Ich habe Probleme mit meinem AppleScript, das alle Dateinamen entfernt, die länger als 13 Zeichen sind. Ich habe eine Liste von Dateinamen in Spalte B und ich brauche nur diejenigen, die 13 Zeichen sind, nicht mehr als. Ich bin auf der Suche nach dem Skript, um die Zeile von etwas mehr als 13 zu löschen. Bisher hat das etwas funktioniert und nicht alle entfernt.AppleScript Zählen und Entfernen von Zeichen in 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
Vielen Dank! Das hat den Trick gemacht! –