[Solved] Performance Questions - getCellByPosition()

Java, C++, C#, Delphi... - Using the UNO bridges
Post Reply
rjsteele
Posts: 23
Joined: Fri Jul 27, 2012 9:20 pm

[Solved] Performance Questions - getCellByPosition()

Post by rjsteele »

Would there be a huge performance impact if I use getCellByPosition(int column, int row) more than a hundred times with different column and row parameters while setting the string value of each cell in calc? I am using the Java API? My programming is writing data to spreadsheet cell. The program will populate hundred of cells. Is there a better way to populate the cells then by using getCellByPosition() for each cell? If so, what is a more efficient way?

Thanks
Last edited by Hagar Delest on Mon Sep 24, 2012 8:18 pm, edited 1 time in total.
Reason: tagged [Solved].
Raymond
Solaris 10 x86 StarrOffice 9 - basis3.1
FJCC
Moderator
Posts: 9280
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Performance Questions - getCellByPosition()

Post by FJCC »

Many calls for UNO objects will generally slow your code. It is faster to use the getDataArray() method of a cell range, edit the array in your code and then use setDataArray() to repopulate the cells.
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
rjsteele
Posts: 23
Joined: Fri Jul 27, 2012 9:20 pm

Re: Performance Questions - getCellByPosition()

Post by rjsteele »

Thanks for the response FJCC.
Raymond
Solaris 10 x86 StarrOffice 9 - basis3.1
Post Reply