Spire.DataExport for .NET is a 100% pure data .NET library suit for exporting data into MS Word, Excel, RTF, Access, PDF, XPS, HTML, XML, Text, CSV, DBF, SYLK, SQL Script, DIF, Clipboard, etc.

Mon Jul 03, 2006 9:42 am

How to add picture in spreadsheets ?


Posts: 2
Joined: Mon Jul 03, 2006 9:40 am

Mon Jul 03, 2006 1:41 pm

You can add pictures to result excel files with the following code

CellImage img1 = new CellImage();
img1.Column = 1;
img1.PictureName = "demo";
img1.Row = 1;

CellPicture pic1= new CellPicture();
pic1.FileName = "C:\\demo.gif";
pic1.Name = "demo";

Technical Support
Spire.DataExport Team


Posts: 35
Joined: Thu Jun 29, 2006 2:29 pm

Mon Jul 03, 2006 2:23 pm

Thank you for the help , I will try.

Posts: 2
Joined: Mon Jul 03, 2006 9:40 am

Thu Jun 21, 2012 4:06 am

How can I resize the image in spreadsheets?
I use the following code cannot resize:
Dim ciStyle As New DataExport.XLS.CellImage

ciStyle.Column = 0
ciStyle.PictureName = "style"
ciStyle.Row = iCurrentRow

Dim cpStyle As New DataExport.XLS.CellPicture

cpStyle.FileName = Server.MapPath("~\Excel\DatelineTracking\StyleImage") + rMain(1).ToString().Replace("/", "\")
cpStyle.Name = "style"
cpStyle.Height = 90
cpStyle.Width = 100

Posts: 1
Joined: Thu Jun 21, 2012 3:58 am

Thu Jun 21, 2012 8:00 am

Hi SqualLee,

Thanks for your inquiry and sorry for the inconvenience caused by us.

I am sorry for that Spire.DataExport doesn't support to resize the Image at this stage. However, our product Spire.Xls can do it perfectly, so you can use it to achieve your requirement if you'd like to. I attached a demo illustrates how to do it use Spire.Xls, please have a look.

In case of any ambiguity, please feel free to contact us.

Have a great day.

e-iceblue support
User avatar

Posts: 154
Joined: Thu Oct 20, 2011 2:53 am

Return to Spire.DataExport