Row Count in spreasheet with Java code

Java, C++, C#, Delphi... - Using the UNO bridges
Post Reply
DEEPCSE
Posts: 1
Joined: Wed Nov 27, 2013 11:51 am

Row Count in spreasheet with Java code

Post 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
Oracle Open Office 3.3.0
hanya
Volunteer
Posts: 885
Joined: Fri Nov 23, 2007 9:27 am
Location: Japan

Re: Row Count in spreasheet with Java code

Post 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.
Please, edit this thread's initial post and add "[Solved]" to the subject line if your problem has been solved.
Apache OpenOffice 4-dev on Xubuntu 14.04
Post Reply