Aquí está el código VBA para personalizar la fuente, el tamaño de la fuente y estilizar los encabezados y pies de página en una hoja de cálculo de Excel:
'With sht.PageSetup
'.CenterHeader = "&R&""Consolas""&KFFFF00" & sht.Name
'.PrintArea = Range(Cells(1, 1), Cells(lastrow, lastcol)).Address
'End With
¿Cómo puedo convertir esto en AppleScript? He intentado lo siguiente:
tell application id "com.microsoft.Excel"
set screen updating to false
set wb to active workbook
set wsName to the name of the active sheet of wb
repeat with ctr from 1 to the count of worksheets in wb
log ctr
set sName to (the name of worksheet ctr of wb)
select worksheet sName
tell page setup object of active sheet
set center header to sName
--.CenterHeader = "&R&""Consolas""&KFFFF00" & sht.Name
-- set center header to "&R&""Consolas""&KFFFF00" & sName
end tell
end repeat
save wb
select worksheet wsName -- return to the original active sheet
set screen updating to true
end tell
pero necesito ayuda en esta línea:
– set center header to "&R&""Consolas""&KFFFF00" & sName