var
fmt: TFlxFormat;
...
begin
fmt := xls.GetFormat(xls.GetCellFormat(R, C)); fmt.HAlignment := THFlxAlignment.right; xls.SetCellFormat(R, C, xls.AddFormat(fmt));
And remember that you can always use APIMate for this kind of stuff. Just create a file in Excel, change the alignment, and open the file in APIMate. It will tell you the code needed to change the alignment.