How to add picture in spreadsheets ?

Technical support for Spire.DataExport

Moderators: iceblue support, DataExport, Manager

How to add picture in spreadsheets ?

Postby michealtech » Mon Jul 03, 2006 9:42 am

How to add picture in spreadsheets ?

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

Postby DataExport » 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;
cellExport1.Images.Add(img1);

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

cellExport1.SaveToFile();
Technical Support
Spire.DataExport Team

support@e-iceblue.com
DataExport
 
Posts: 35
Joined: Thu Jun 29, 2006 2:29 pm

Postby michealtech » Mon Jul 03, 2006 2:23 pm

Thank you for the help , I will try.
michealtech
 
Posts: 2
Joined: Mon Jul 03, 2006 9:40 am

Re: How to add picture in spreadsheets ?

Postby SquallLee » 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
objCellExport.Images.Add(ciStyle)

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
objCellExport.Pictures.Add(cpStyle)
SquallLee
 
Posts: 1
Joined: Thu Jun 21, 2012 3:58 am

Re: How to add picture in spreadsheets ?

Postby Suvi.Wu » 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.

BR
Suvi
e-iceblue support
User avatar
Suvi.Wu
 
Posts: 156
Joined: Thu Oct 20, 2011 2:53 am


Return to Spire.DataExport

Who is online

Users browsing this forum: No registered users and 0 guests