Hi,
I have tried the following code and when I export to Excel 2007 format the alignments are completely ignored. If I export to Excel 97 - 2003 format it applies the formatting:
procedure TForm1.Button15Click(Sender: TObject);
var
Temp : TXLSReadWriteII4;
begin
Temp := TXLSReadWriteII4.Create(Self);
try
temp.Filename := 'C:\fileXLSReadWrite.xlsx';
Temp.Version := xvExcel2007;
Temp.Sheet[0].AsString[1,6] := 'Anton';
Temp.Sheet[0].Cell[1,6].HorizAlignment := chaCenter;
Temp.Sheet[0].Cell[1,6].VertAlignment := cvaCenter;
Temp.Write;
finally
Temp.Free;
end;
end;
Now I remember reading somewhere that the Excel 2007 functionality currently supports cell formatting and wrapping. Why is this functionality not working?
How can I get this to work?
Anton Bosch
HorizAlignment and VertAlignment don't work in 2007
Re: HorizAlignment and VertAlignment don't work in 2007
Sorry forgot to mention I am using 4.00.31
Re: HorizAlignment and VertAlignment don't work in 2007
Hello
This will be fixed in a later update.
This will be fixed in a later update.
Lars Arvidsson, Axolot Data