Any method for shifting Rows

Hello,

Is there any method in Aspose.cell similar to the shiftRows method in POI i.e.

shiftRows(int startRow, int endRow, int n)
Shifts rows between startRow and endRow n number of rows.

shiftRows(int startRow, int endRow, int n, boolean copyRowHeight, boolean resetOriginalRowHeight)
Shifts rows between startRow and endRow n number of rows.

Best Regards,

Kanistha

Hi Kanistha,

Thanks for your inquiry.

Well, there is no such api in Aspose.Cells for Java. We have some methods for the Cells class, so you may try them e.g. deleteRows and deleteRangeShiftUp and deleteRangeShiftToLeft etc. But these method will work if you are deleting row(s) or a range of cells.

After seeing your mentioned methods, I think it is possible that we can provide similar api for you soon although we need to look into this feature thoroughly at first. But before doing this, we need some confirmation from you for the results, for example, shiftRows(5,7,2), the row 5,6,7 will be changed as 3,4,5 and row 3,4 be changed as row 6,7. is it right? Please give us complete details how do you want to perform the method(s).

Thank you.

Hello Amjad,

Thank you for your quick response.

Well my requirement is

1. I am rendering the excel view using the Aspose.cell and using a template in which I have multiple tables to display.

2. Depending upon the number of records fetched for one table, it need to shift the corresponding column header to the new location.

3. In POI there is a shiftRows method as I mentioned earlier which shifts the rows between start row and end row n number of rows if the number of records is say n.

So I was looking the same feature in Aspose.cell but could not get any. If you have any clue please let me know.

Best Regrads,

Kanistha

Hi Kanistha,

Thank you for considering Aspose.

We will look into the feasibility of your required feature and get back to you soon.

Thank You & Best Regards,

Hi Kanistha,

For .... In POI there is a shiftRows method as I mentioned earlier which shifts the rows between start row and end row n number of rows if the number of records is say n.

Well, we can provide the feature for shifting rows, but we have to make sure that it should work for your way. So, could you give us complete detail on how the rows would be shifted (upwards / downwards etc.). We also appreciate if you could create template files manually in MS Excel and post us the template files (one before shifting rows and other after shifting rows) to point out the process. In this way, we can provide the shifting rows feature that will suit your need.

Thanks for your help.

Hello,

The details for the new required feature is as below:

Eg: shiftRows(int startRow, int endRow, int n, boolean copyRowHeight, boolean resetOriginalRowHeight) - Shifts rows between startRow and endRow n number of rows.

where:

  • n - number of rows to be shifted (can be positive or negative numer)
  • startRow - index of start row
  • endRow - index of end row
  • copyRowHeight - coppying the row height
  • resetOriginalRowHeight - reset to the default

The rows starting from startRow to endRow can be shifted to upward or downward by n number of rows. The shifted rows style should be cpoied as well.

. ..how the rows would be shifted (upwards / downwards etc.)?

We should be able to shift the rows upward or downward as per the current requirement i.e In the above examp

  • by setting 'n' as positive we can shift the rows downward and
  • by seting 'n' as negative we can shift the rows upward

Best Regrad,

Kanistha

Hi,

Thank you for considering Aspose.

Please try the attached latest version of Aspose.Cells. As you described, we have provided a new API:

Cells.shiftRows( int startRow, int endRow, int n )

where:

  • n - number of rows to be shifted (can be positive or negative numer)
  • startRow - index of start row
  • endRow - index of end row

Please try this new fix to check whether it can fit his requirement

Thank You & Best Regards,

The issues you have found earlier (filed as 9975) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.