D
David Avsajanishvili
Hello!
I'm writing convertor from report-generator to Excel fromat, and have a
problem: cannot insert picture into Excel worksheet. I try to use this code
to save picture as a file on disc, and then load it to worksheet:
------------------------------------------------
SavePicture myPicture, fnm
xlWsht.Shapes.AddPicture fnm, False, True, rng.Left, rng.Top, rng.Width,
rng.Height
FileSystem.Kill fnm
------------------------------------------------
This example works proprely, while type of picture is Bitmap. But when I try
to do it with Icon or Metafile, excel alerts:
"The specified file wasn't found."
Maybe there is any other way to insert icons and metafiles, or to convert
them into Bitmap format.
Please, help!
I'm writing convertor from report-generator to Excel fromat, and have a
problem: cannot insert picture into Excel worksheet. I try to use this code
to save picture as a file on disc, and then load it to worksheet:
------------------------------------------------
SavePicture myPicture, fnm
xlWsht.Shapes.AddPicture fnm, False, True, rng.Left, rng.Top, rng.Width,
rng.Height
FileSystem.Kill fnm
------------------------------------------------
This example works proprely, while type of picture is Bitmap. But when I try
to do it with Icon or Metafile, excel alerts:
"The specified file wasn't found."
Maybe there is any other way to insert icons and metafiles, or to convert
them into Bitmap format.
Please, help!