Page 1 of 1

[Solved] Performance Questions - getCellByPosition()

Posted: Sat Sep 22, 2012 12:58 am
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

Re: Performance Questions - getCellByPosition()

Posted: Sat Sep 22, 2012 2:59 pm
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.

Re: Performance Questions - getCellByPosition()

Posted: Mon Sep 24, 2012 6:55 pm
by rjsteele
Thanks for the response FJCC.