Import file *.jpg or *.bmp

Using (or providing) components based on the "Win32" framework

Import file *.jpg or *.bmp

Postby Tranber44 on Mon Mar 04, 2019 10:25 am

Hello,

I would like to integrate images in *.bmp or *.jpg format, by an APL program, in an Excel sheet, from external files.
The codification
ActiveSheet.Pictures.Insert('D:Ges/FicBas/Sign.bmp')
returns VALUE ERROR. I use ⎕WX 1.Is there a solution?

Regards

Bertrand Delassus
Tranber44
 
Posts: 34
Joined: Mon Jan 11, 2010 4:46 pm

Re: Import file *.jpg or *.bmp

Postby Vince|Dyalog on Tue Mar 05, 2019 11:30 am

Hi Bertrand,

I think the Pictures.Insert method does not exist in OLE and will only work with .NET. Are you using .NET? If so, can you post the code that you have to create ActiveSheet please?

For OLE, Dan had written an answer for this previously (https://forums.dyalog.com/viewtopic.php?f=30&t=1095#p4415), and it is this:

      xl.ActiveSheet.Shapes.AddPicture 'C:\Program Files\Dyalog\Dyalog APL-64 17.0 Unicode\ws\bubbles.bmp' 0 1 0 0 100 100


Regards,

Vince
Vince|Dyalog
 
Posts: 305
Joined: Wed Oct 01, 2008 9:39 am

Re: Import file *.jpg or *.bmp

Postby Tranber44 on Tue Mar 05, 2019 3:47 pm

Hi Vince,

Thank you for that information. Dan’s solution works perfectly and addresses all my problems.

Regards

Bertrand
Tranber44
 
Posts: 34
Joined: Mon Jan 11, 2010 4:46 pm


Return to Windows: GUI, COM/OLE/ActiveX

Who is online

Users browsing this forum: No registered users and 1 guest