Hi 66de250,
Please try following.
worksheet -s 0 0 0 0; //sel all columns
//the two sec commands below will be not needed in the upcoming 2025b version
sec -p 0.2;
sec -pw %H;
Menu -e 35153; //35153 is the id for center alignment toolbar
https://www.originlab.com/doc/en/LabTalk/ref/Worksheet_Options_Other#-s
https://www.originlab.com/doc/LabTalk/ref/Menu-cmd#-e.3B_Execute_the_menu_command_with_the_specified_ID
PS, you may also try using theme, like below.
https://my.originlab.com/ftp/forum_and_kbase/Images/T48645_CenterAlign.oth
themeApply2w theme:=T48645_CenterAlign option:=active;