We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Remove Cells e move content to RIght

Thread ID:

Created:

Updated:

Platform:

Replies:

103208 Apr 11,2012 08:44 PM UTC Apr 13,2012 09:14 AM UTC Windows Forms 1
loading
Tags: XlsIO
Fabio Cavalcante
Asked On April 11, 2012 08:44 PM UTC

Hi,

I'm trying to make a deletion/insertion of a cell.

But i need to perform a action like Excel.

Before add/remove, i need to shift cells to right or left, depends on user's choice. To add/remove columns, i used

this.Model.Data.InsertCols(index, colsToAdd);
this.Model.Data.InsertRows(index, colsToAdd);

E.g. When i delete a cell, i need to move the left content to right.
For example, i have a A1, A2 and A3 cells. If i remove A2 i need to move A3 content to A2 place.

There's a built in method to do this?

Thanks.


Sridhar [Syncfusion]
Replied On April 13, 2012 09:14 AM UTC

Hi Fabio,

Thank you for using Syncfusion products.

In Essential XlsIO, currently we do not have support for shift the cells available in MS Excel.We have support to shift the entire row/column (by insert/delete row/column).

However, we have the support to move the cell content from one cell to another cell in XlsIO. Please use the MoveTo(IRange) method available with XlsIO.

Code Snippet [C#]:

//Moves the A3 cell content to cell A2 and replaces it

sheet.Range["A3"].MoveTo (sheet["A2"]);

We have created the sample for the same at our side and attached here for your reference. Please try the sample and let us know if this helps you.


Please let me know if you require any further clarifications.


Thanks,
Sridhar.S





MoveCell_677561fc.zip

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;