Images in (merged) cells of TAdvGridWorkbook look weird after Save and open as BIN file

My environment: Delphi 12.1, VCL UI Pack 13.4.0.0, Flexcel and VCL Grid Excel Bridge. A sample project is added. What has been done: Image added to the tAdvGridWokbook, saved as BIN file ether with TAdvGridExcelIO or TAdvGridExcelExport. The presentation after openeing the BIN file is weird. I tried adapting the settings of the components: without result. I need your help.
Best regrds Heinz-Gerd Kneip

ASGImageMergedCellsSaveLoadAsBIN.pdf (192.1 KB)


MergedcellsBINfile.zip (94.1 KB)

I'm not sure how you did setup the TAdvGridWorkbook or how you try to work with it.
A TAdvGridWorkbook is designed to internally have its own grid and somehow you added a external grid to the TAdvGridWorkbook but still use the TAdvGridWorkbook to somehow also import / export this external grid along with the workbook.

When I do the setup properly, i.e. either a separate grid or use a TAdvGridWorkbook using its internal grids, this works properly.
See the test project based on your inputs both with a grid and workbook and saving & loading a picture in a merged cell works as expected.

Project1.zip (61.9 KB)

Dear Mr. Fierens

Your example project1 has been very useful. You used the ADDPICTURE method which led to the wanted result. Instead I had used the CREATEFILEPICTURE method, which produced the weird results. The inserted images in column1 were added with AddPicture, the inserted images in column 4 were added with CreateFilePicture. Then the workbook was exported to BIN or XLS and imported: Cf. the screenshot below.
Instead of asking why a good and a weird result were produced, I am happy in using the AddPicture method now.

Best regards Heinz-Gerd Kneip

1 Like