Select column in Calc

2013-02-12 Thread Galileo Teco Juárez
Select column in Calc

as I can select from Python
the value of a particular column in Calc

or is necessary for the user to select?

regards

-- 
*Galileo Teco Juarez*
*Web:* http://80bits.wordpress.com
*Twitter:* @genitalico http://twitter.com/genitalico
*Linkedin:* http://mx.linkedin.com/pub/galileo-teco-ju%C3%A1rez/30/690/797


Re: Select column in Calc

2013-02-12 Thread Galileo Teco Juárez
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*


2013/2/12 Galileo Teco Juárez genital...@gmail.com

 Select column in Calc

 as I can select from Python
 the value of a particular column in Calc

 or is necessary for the user to select?

 regards

 --
 *Galileo Teco Juarez*
 *Web:* http://80bits.wordpress.com
 *Twitter:* @genitalico http://twitter.com/genitalico
 *Linkedin:* http://mx.linkedin.com/pub/galileo-teco-ju%C3%A1rez/30/690/797




-- 
*Galileo Teco Juarez*
*Web:* http://80bits.wordpress.com
*Twitter:* @genitalico http://twitter.com/genitalico
*Linkedin:* http://mx.linkedin.com/pub/galileo-teco-ju%C3%A1rez/30/690/797


Re: Select column in Calc

2013-02-12 Thread Ariel Constenla-Haile
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


Re: Select column in Calc

2013-02-12 Thread Andrew Douglas Pitonyak
Do you want to get, take, or obtain the value that is in the cell, 
or, do you want to select the cell so that it is the current cell?

On 02/12/2013 03:18 PM, 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*


2013/2/12 Galileo Teco Juárez genital...@gmail.com


Select column in Calc

as I can select from Python
the value of a particular column in Calc

or is necessary for the user to select?

regards

--
*Galileo Teco Juarez*
*Web:* http://80bits.wordpress.com
*Twitter:* @genitalico http://twitter.com/genitalico
*Linkedin:* http://mx.linkedin.com/pub/galileo-teco-ju%C3%A1rez/30/690/797






--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
Info:  http://www.pitonyak.org/oo.php