We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Insert picture in Excel from file path using smart markers

Dear Aspose,

We are implemeting project which creates reports using Word Mail Merge and/or Excel Smart Markers. And ecountered below limitation of Aspose.Cells. Could you please help us on below?

Using smart markers in excel, we are not able to insert picture from file path. Your examples explains to read picture file to BYTE stream before calling WorkbookDesigner.SetDataSource() and WorkbookDesigner.Process(). But, we are implemeting runtime datasource and excel file. Hence, can not know which data column is of picture type and has BYTE data of picture or file path of picture.

Let us know if Aspose.Cells has posibility to take file path of picture for smart marker with (Picture) attribute like &=EmpTable.EmployeePhoto(Picture:FitToCell). Becuase, we have file path of picture for EmployeePhoto column.

Whereas, while implementing the same in Aspose.Words using MailMerge and ExceuteWithRegion, we found that it works for both, i.e it populates picture using file path of picture and BYTE data of picture when we place field as <>

Thanks in advance,



Thanks for your query.

Please check the example (for picture parameter) under “Image Markers” sub-topic for your reference:

This example shows that you may setup your datasource dynamically and get the picture from some path and retrieve byte arrays to save into the column of object type. I am afraid, there is no directly way that you specify the marker and it could extract images from the back end column.

Moreover, if you need to insert pictures from some path/location, please see the topic for your reference:

Thank you.