Copying the imagecell image to a picturebox using Spread 11/12

Posted by: steven.wood on 1 August 2019, 11:50 am EST

    • Post Options:
    • Link

    Posted 1 August 2019, 11:50 am EST

    How do you copy the image stored in an image cell and use it as the image of a picture box?

  • Posted 2 August 2019, 8:44 am EST

    Hello,

    Please use the following lines of code to set the image to PictureBox

         ```
    

    pictureBox1.Image = (Image)fpSpread1.Sheets[0].Cells[0, 0].Value;

    
    Hope it helps.
    
    Thanks.
  • Posted 2 August 2019, 10:45 am EST

    Is the code you suggested C#, if so what is the VB equivalent as it does not accept that coding.

    Thanks

  • Posted 2 August 2019, 10:51 am EST

    Hello,

    Please use the following VB equivalent code:

    
    pictureBox1.Image = CType(fpSpread1.Sheets(0).Cells(0, 0).Value, Image)
    
    

    Thanks,

  • Posted 4 August 2019, 7:23 am EST

    That worked fine.

    Thanks

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels