Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

Sun Jan 15, 2017 8:16 pm

Hi,

I have a request that SpireXLS should also delete images when deleting the rows wherein the images are located.

Currently, when spire deletes rows, it does not delete the images found in the row range - which Excel would do if selected.

eg. if i use the following example where images are in row 120-130, they are not deleted.
lWorkSheet.DeleteRow(100,200);

pedgaard
 
Posts: 24
Joined: Fri May 20, 2016 3:12 pm

Mon Jan 16, 2017 6:23 am

Hello povl,

Thanks for you inquire.
I am afraid that WorSheet.DeleteRow(int index,int count) does not delete the images from the worksheet. This functionality of deleting rows is same as MS Excel, if you delete the rows in MS Excel with Images, it will not delete the images either. But you can use WorkSheet.Pictures[int index].Remove() to delete the image you want.

Thanks,
Simon
E-iceblue support team
User avatar

Simon.yang
 
Posts: 620
Joined: Wed Jan 11, 2017 2:03 am

Tue Jan 17, 2017 7:08 am

Hi Povl,

How is it going? Did my advice work? Please give us some feedback at your convenience.
Any queries, please don't hesitate to contact us.

Thanks,
Simon
E-iceblue support team
User avatar

Simon.yang
 
Posts: 620
Joined: Wed Jan 11, 2017 2:03 am

Tue Jan 24, 2017 8:36 pm

Hi Simon,

Very busy at the moment, so sorry for late feedback. Excel has a behavior that does in deed delete pictures within a range of rows, if the pictures has been set to in their properties - the setting relating to "not move with cells". Can you confirm this?

pedgaard
 
Posts: 24
Joined: Fri May 20, 2016 3:12 pm

Wed Jan 25, 2017 7:57 am

Hello Povel,

I have confirmed that the Spire.Xls could delete images when deleting the rows by using WorSheet.DeleteRow(int index,int count) method if the pictures properties has been set as "move with cells" .
If there are questions, please contact us.

Thanks,
Simon
E-iceblue support team
User avatar

Simon.yang
 
Posts: 620
Joined: Wed Jan 11, 2017 2:03 am

Return to Spire.XLS

cron