I have always read through the cells of a spreadsheet using a loop but now I am using some very long spreadsheets with many columns each requiring their own list.
Right now, for a 500 row spreadsheet this script takes 2 minutes to run. Is there a faster way?
thanks,
set firstNumber to display dialog "From which line number would you like to start?" default answer ""
set lastNumber to display dialog "On which line would you like to end?" default answer ""
set firstVim to text returned of firstNumber
set lastVim to text returned of lastNumber
--- Get Data From Excel
set {timeCode} to {{}}
set {theme1} to {{}}
set {theme2} to {{}}
set {theme3} to {{}}
set {theme4} to {{}}
set {theme5} to {{}}
set {timType} to {{}}
set {assetName} to {{}}
set {stimName} to {{}}
tell application "Microsoft Excel"
repeat with r from firstVim to lastVim
copy value of cell 1 of row r of active sheet as integer to the end of timeCode
copy value of cell 6 of row r of active sheet to the end of theme1
copy value of cell 7 of row r of active sheet to the end of theme2
copy value of cell 8 of row r of active sheet to the end of theme3
copy value of cell 9 of row r of active sheet to the end of theme4
copy value of cell 10 of row r of active sheet to the end of theme5
copy value of cell 2 of row r of active sheet to the end of stimName
copy value of cell 3 of row r of active sheet to the end of timType
copy value of cell 4 of row r of active sheet to the end of assetName
end repeat
end tell
display dialog "INPUT COMPLETE"