On Tue, Feb 12, 2013 at 02:18:42PM -0600, Galileo Teco Juárez wrote:
sorry mistake
of translations
this is the real question
*how can i select the value of a colum in a specific cell. ie, select the
value of 10 from the B4 cell*
look at the API index for methods starting with G:
http://www.openoffice.org/api/docs/common/ref/index-files/index-7.html
getCellByPosition()
function in interface ::com::sun::star::sheet::XCellRangesAccess
http://www.openoffice.org/api/docs/common/ref/com/sun/star/sheet/XCellRangesAccess.html#getCellByPosition
getCellByPosition(
[in] longnColumn,
[in] longnRow,
[in] longnSheet )
This method is support by the collection of sheets.
getCellByPosition()
function in interface ::com::sun::star::table::XCellRange
http://www.openoffice.org/api/docs/common/ref/com/sun/star/table/XCellRange.html#getCellByPosition
getCellByPosition(
[in] longnColumn,
[in] longnRow )
This method is supported by the single sheet.
See
http://wiki.openoffice.org/wiki/Documentation/DevGuide/Spreadsheets/Cell_and_Cell_Range_Access
Regards
--
Ariel Constenla-Haile
La Plata, Argentina
# *
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# License); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
#http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# *
# HelloWorld python script for the scripting framework
def MyHelloWorldPython( ):
doc = XSCRIPTCONTEXT.getDocument()
# may be it doesn't implement css.lang.XServiceInfo
try:
# check that we have a SpreadsheetDocument
if not doc.supportsService(com.sun.star.sheet.SpreadsheetDocument):
return None
except:
return None
# the collection of sheets
sheets = doc.Sheets
# method taking col, row, spreadsheet
cell = sheets.getCellByPosition(0,0,0)
cell.Text.String = Hello world! on (0,0,0)
# get the first spreadsheet from the collection
sheet = sheets.getByIndex(0)
cell = sheet.getCellByPosition(0,1)
cell.Text.String = Hello world! on (0,1)
cell = sheet.getCellByPosition(0,2)
cell.Value = 18.63
return None
pgptVBVgZZGTS.pgp
Description: PGP signature