Migration from 4 to 5: picture alignment and PixelWidth
Posted: Tue Feb 11, 2014 4:20 pm
Hello Lars, I have two additional questions I faced during migration from 4 to 5 version:
1) picture aligned with columns:
in version 4 I wrote something like this:
the result was the picture was perfectly border aligned from row,col 0,0 leftmost to 2,5 rightmost
Now with:
The image is aligned on the left values, bottom row 5 value also is ok, but not on the right of column 2 value (= col2 alignment is wrong)
2) Columns width Excel 2007
When I open the file with Excel 2007, the column[0] width is not 70 but 63
Delphi version is 2007 and xlsreadwrite 5 version is the latest 5.20.15
Let me know, thanks
-Massimo
1) picture aligned with columns:
in version 4 I wrote something like this:
Code: Select all
with XLS[0].DrawingObjects.Pictures.Add do
begin
PictureID := XLS[0].DrawingObjects.Pictures.Count;
PictureName := mp.Filename;
Col1 := 0;
Row1 := 0;
Col2 := 2;
Row2 := 5;
end;
Now with:
Code: Select all
Image := XLS[0].Drawing.InsertImage(strFileName, 0, 0, 0, 0, 1);
Image.Col1 := 0;
Image.Row1 := 0;
Image.Col2 := 2;
Image.Row2 := 5;
2) Columns width Excel 2007
Code: Select all
XLS.clear;
XLS[0].Columns[0].PixelWidth :=70;
XLS.write;
Delphi version is 2007 and xlsreadwrite 5 version is the latest 5.20.15
Let me know, thanks
-Massimo