Page 1 of 1

Row Count in spreasheet with Java code

Posted: Wed Nov 27, 2013 11:57 am
by DEEPCSE
Hi,

i am using the Oracle OPen Office 3.3.0,

i have one scenario where i need to return the Row count of a Spreadsheet only the data entered rowcount using the java code.
if i use the rowcount() function then the entire spreadsheet rowcount is displaying example 1lakh rows displayed using the Java Code. please help me to get the Rowcount of only the entered data using the java code.

thanks
Deepak

Re: Row Count in spreasheet with Java code

Posted: Sun Dec 01, 2013 5:58 pm
by hanya
Hi,

Use the cell cursor and call com.sun.star.sheet.XUsedAreaCursor::gotoEndOfUsedArea method to move the cursor to the end of the row used in the sheet. And check the row index.
In this kind of API, there is no difference between the usage among languages that you are using. You can find some examples written in Basic and rewrite them in Java.