Row Count in spreasheet with Java code

Java, C++, C#, Delphi, ??? - Using the UNO bridges

Row Count in spreasheet with Java code

Postby DEEPCSE » Wed Nov 27, 2013 11:57 am

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
DEEPCSE
 
Posts: 1
Joined: Wed Nov 27, 2013 11:51 am

Re: Row Count in spreasheet with Java code

Postby hanya » Sun Dec 01, 2013 5:58 pm

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


Return to External Programs

Who is online

Users browsing this forum: No registered users and 3 guests