Issue transfering images from Spread 8 to Spread 11/12

Posted by: steven.wood on 5 August 2019, 2:11 pm EST

    • Post Options:
    • Link

    Posted 5 August 2019, 2:11 pm EST

    I am currently updating an application from VB6/Spread 8 to VB.NET/Spread 11 and am experiencing issues with the transfer of images in Spread 8 image cells to Spread 11 image cells.

    Having loaded the Spread 8 workbook into a Spread 11 workbook I am able to extract and reformat all the data into a new workbook except the images in the image cells…

    Setting the new workbook .value to the imported Spread 8 workbook .value does not copy the image, the cell remains blank, using the CTYPE function does not resolve the issue either.

    I can copy and paste the image cells from one workbook to the other and the image appears in the cell, however, I am unable to access the image using .value for use elsewhere in the application.

    Any suggestions as to how to resolve this issue?

  • Posted 6 August 2019, 6:32 am EST

    Hello,

    I am able to get image in Spread11 from Spread8 XML file using the following lines of code:

    
      sp.Open("C:\Users\MohitG\Downloads\Test\test.xml")
        Dim img As Image = CType(sp.Sheets(0).Cells(0, 0).Value, Image)
    
    

    Please refer the attached XML file. Could you share the XML file so that I can replicate the issue at my end?

    Thanks.

    test.zip

  • Posted 6 August 2019, 11:33 am EST

    The Spread 8 file is an .ss8 file not an XML file. I have attached the file.

    The images are on Sheet 8 and in Column 6 using the Spread 11 nomenclature of 0 being the first sheet and column.

  • Posted 6 August 2019, 2:37 pm EST

    Sorry attached .ss8 file instead of ZIP file

    SS8 File.ziprry sent

  • Posted 7 August 2019, 8:05 am EST

    Hello,

    Please use the following line of code:

    sp.OpenSpreadFile(@"C:\Users\MohitG\Downloads\Test\RoadDemo.ss8",-1)
    Dim img As Image = (TryCast(sp.Sheets(8).Cells(4, 6).CellType, FarPoint.Win.Spread.CellType.EmptyCellType)).BackgroundImage.Image
    

    Hope it helps.

    Thanks.

  • Posted 9 August 2019, 2:08 pm EST

    Thanks, that works fine.

Need extra support?

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

Learn More

Forum Channels