Apple script update qlab from excel

39 views
Skip to first unread message

Jinx norvell

unread,
Mar 3, 2026, 3:55:57 PM (3 days ago) Mar 3
to QLab
Hey, right now I am trying to make a script that grabs excel and updates the q list by grabbing the q number and updating the q with that number to change its notes, currently I am running the code below but thats not working any help would be appreciated 

tell application id "com.microsoft.Excel" to tell active sheet
set theRowCount to (count of rows of used range)
set theColCount to (count of columns of used range)
end tell

tell application id "com.figure53.QLab.5" to tell front workspace
set textReturn to display dialog "Cue number Column (as a number not letter)" default answer "5"
set columnnumber to text returned of textReturn
set textReturn to display dialog "Cue called Column (as a number not letter)" default answer "7"
set columnnotes to text returned of textReturn

set textReturn to display dialog "What row does your data start" default answer "3"
set rowstart to text returned of textReturn

repeat with eachCue from 1 to theRowCount - 1
set theData to {}
tell application id "com.microsoft.Excel" to tell active sheet
repeat with eachCell from 1 to theColCount
set the end of theData to (value of cell eachCell of row (eachCue + rowstart - 1)) as text
end repeat
end tell
set qnumber to get (item columnnumber of theData as string) - ".0"
set the q name of qnumber to (item columnnotes of theData as string)
end repeat
end tell

Jinx norvell

unread,
Mar 3, 2026, 3:56:58 PM (3 days ago) Mar 3
to QLab
additional context every time it is saying it cannot set q name / notes of 0 to "example string"

micpool

unread,
Mar 3, 2026, 7:29:09 PM (2 days ago) Mar 3
to QLab
The error tells you exactly what's wrong! notes of "0" is meaningless. notes of cue "0" however.......

set the q name of cue qnumber to (item columnnotes of theData as string)

Reply all
Reply to author
Forward
0 new messages