Hello,
I am attempting to export a series of data to individual sheets in an excel file. I want to name the sheets [lname]_Teams, but I keep getting an invalid syntax error. Is this action possible with a loop? Alternatively, is there a more efficient way to approach this? Many thanks!
CODE:
forval i 1/10{
export excel using "Drop_Teams_June2023" if total_records==`i', sheet("`i'_Teams") sheetmodify firstrow(variables)
}
I am attempting to export a series of data to individual sheets in an excel file. I want to name the sheets [lname]_Teams, but I keep getting an invalid syntax error. Is this action possible with a loop? Alternatively, is there a more efficient way to approach this? Many thanks!
CODE:
forval i 1/10{
export excel using "Drop_Teams_June2023" if total_records==`i', sheet("`i'_Teams") sheetmodify firstrow(variables)
}
Comment