Dear Friends,
in Progress9.1D,
I could insert image into Excel sheet using the following code,
DEFINE VARIABLE chPicture AS COM-HANDLE NO-UNDO.
chPicture = chWorksheet:Pictures:INSERT("D:\HRMS\AppSrv\sys\src\adm2\image\ggg.jpg":U,).
but I want that image into purticular cell of excel sheet.
like:- chWorkSheet:Range("D" + string(icntr)):Value = "Here the Image"
and, I've Progress table "Images" filed "ImageData" as RAW.
I tried this using LOAD-IMAGE, LOAD-PICTURE..., and Dynamic frame, image.
when I using dynamics, it shows "TRUE" in the cell. means picture has been found.
I couldn't see picture.
need help.
I may be completely wrong here, but I don't think you can place pictures into a cell in excel. The top left corner of the selected cell will be the top left corner of the inserted picture. Perhaps you could locate the cursor to the right cell before doing your normal chWorksheet:Pictures:INSERT("...")??
Thing is that,
Example, chXlsSheet:Range(“B3”):Value = “EmployeePhoto”.
here I've used "Range/Value"-method to select the particular cell.
Does this do something like what you're looking for?
DEFINE VARIABLE chExcel AS COM-HANDLE.
CREATE "Excel.Application" chExcel.
chExcel:Workbooks:ADD().
chExcel:Visible = TRUE.
chExcel:Range("C7"):Select.
chExcel:ActiveSheet:Pictures:Insert("C:\temp\myImage.wmf"):Select.
Wow, Thank you very much . Its working!
Message was edited by:
Sridevi Stalin
The code above simply starts Excel, creates a new spreadsheet and ready a picture from the filesystem, placing it in the cell C7. Assuming you have an OpenEdge development license and Excel installed, you should be able to just paste a copy of the code into the procedure editor and run it.
eek, what is a 'OpenEdge development license' is there an easier way of inserting a picture into a cell?
Thanks for your patients