Images in Excel (xls) files

1 Answer 410 Views
SpreadProcessing
Erwin
Top achievements
Rank 1
Erwin asked on 04 Nov 2021, 11:37 AM | edited on 04 Nov 2021, 11:45 AM

Hi,

I have a simple Excel file with just one sheet and one image in .xls and in .xlsx (attached in the zip file).

When reading the files using the XlsFormatProvider or XlsxFormatProvider, I get a workbook. When iterating the shapes on every sheet, I have a different result. I can retrieve the image using the XlsxFormatProvider in the xlsx file, but I'm not getting any shapes in the .xls file using the XlsFormatProvider.

Some code below:

var provider = new XlsxFormatProvider();
using (var fs = File.OpenRead("image.xlsx"))
{
    var workbook = provider.Import(fs);
    Assert.AreEqual(workbook.ActiveWorksheet.Shapes.Images.Count(), 1);
}

Should I be doing this differently? Or is this a known limitation?

I'm using version 2021.3.909.40.

Edit: just noticed that the same goes for charts.

1 Answer, 1 is accepted

Sort by
0
Tanya
Telerik team
answered on 08 Nov 2021, 09:23 AM

Hello Erwin,

XlsFormatProvider currently doesn't support images and charts. We have logged a request about the images support on our public portal: SpreadProcessing: Add support for images when importing XLS, and I have just opened a new one on your behalf for the charts: SpreadProcessing: Add support for charts when working with XLS. You can use the linked items to vote for the implementation of the tasks and subscribe to them if you would like to receive updates about changes in their status.

Hope this information is useful.

Regards,
Tanya
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
SpreadProcessing
Asked by
Erwin
Top achievements
Rank 1
Answers by
Tanya
Telerik team
Share this question
or