Regarding SetEndColumn() and SetEndRow()

Hi,

In aspose 2.5.3 jar version SetEndColumn() and SetEndRow() is used. What is the alternate code is used for Aspose jar version 7 and above. Please explain with simple code. So that we will change accordingly.

How to set end column or end row in particular range?

Thanks Regards,
Saravanan Mani

Hi Saravanan,

Thank you for contacting Aspose support.

Please provide us your code snippet from v2.5.3 of Aspose.Cells for Java using the aforesaid methods. This will help us understand with which class these methods were associated, and what were their purpose.

In current releases of Aspose.Cells for Java, you will find the StartRow, EndRow, StartColumn & EndColumn properties exposed by the CellArea class where CellArea can be used for search and sortingpurposes. Please check the following piece of code for elaboration.

Java

CellArea area = new CellArea();
area.StartRow = 0;
area.EndRow = 1;
area.StartColumn = 0;
area.EndColumn = 1;
System.out.println(area); //Aspose.Cells.CellArea(A1:B2)[0,0,1,1]

Hi,

This setter method is used NamedRange.class but current version we dont have SetEndcolumn() in Range class.

NamedRange Calss=namedRange.setEndColumn(startCol + colIndex - 1);

How to modify the according to Range class.


Thanks & Regards,
Saravanan Mani

Hi Saravanan,


Thank you for providing the code snippet.

I am afraid, there seems to be no alternative to your mentioned methods in the current revisions of Aspose.Cells APIs. In your provided code snippet, you are altering the existing range by changing the range’s end column, I believe this may not be possible too. However, while creating a range, you have plenty of overloaded version of Cells.createRange method that takes different parameters that may suit your requirements.