This is what I wanted to do:
I want the same thing, but with "write"
/*
$Id: TOOS.prg,v 1.3 2006/03/09 02:41:04 oskar Exp $
Lira Lira Oscar Joel [oSkAr]
Proyecto : TExcelR
Archivo : TOOS.prg
Creacion : 01/14/2006, 21:27
Actualizacion: :>: 03/13/2006 08:25
Historial : :>>
Clases y Metodos
================================================================================================
TOOSheet() CLASS From TOpenOffice
ActivateSheet( xHoja ) // Activa una hoja puede ser por
numero o por nombre
ActiveCell() // Retorna el Objeto Cell o Range
Activo
Cell( xVal1, xVal2 ) // Obtiene un Objeto Cell ya sea por
nombre "A1", pasando
// Ambos parametros 0, 0
CountSheets() // Cuenta las hojas existentes en el
libro
Range( xVal1,xVal2,xVal3,xVal4 ) // Obtiene un objeto cell de un
rango ya sea por nombre "A1:A5"
// o por posicion pasando todos los
parametros ( 0,0,0,5 )
Init() // Recarga los parametros iniciales
InsertSheet( cName, nPos ) // Inserta una hoja en el libro
NameSheet( nHoja ) // Devuelve el nombre del una hoja
SaveToPdf( cFile ) // Guarda el fichero en PDF
*/
#include "Fivewin.ch"
/*-----------------------------------------------------------------------------------------------*/
CLASS TOOSheet From TOpenOffice
DATA oaHojas
DATA oHoja
METHOD ActivateSheet( xHoja )
METHOD ActiveCell()
METHOD Cell( xVal1, xVal2 ) INLINE TOOSCell():New( SELF, xVal1, xVal2 )
METHOD CountSheets() INLINE ::oahojas:Count
METHOD Range( xVal1, xVal2, xVal3, xVal4 )
METHOD Init()
METHOD InsertSheet( cName, nPos )
METHOD NameSheet()
METHOD SaveToPdf( cFile ) INLINE ::oDoc:storeToURL( "file:///" +
::ConvertToURL( cFile ),;
{ ::GetPropertyValue( "FilterName",
"calc_pdf_Export" ) } )
METHOD SaveToXLS( cFile ) INLINE ::oDoc:storeToURL( "file:///" +
::ConvertToURL( cFile ),;
{ ::GetPropertyValue( "FilterName",
"MS Excel 97" ) } )
ENDCLASS
/*-----------------------------------------------------------------------------------------------*/
METHOD ActiveCell()
LOCAL oCell
oCell := TOOSCell()
oCell:oSheet := SELF
oCell:oCell := ::oDoc:CurrentSelection
RETURN oCell
/*-----------------------------------------------------------------------------------------------*/
METHOD Range( xVal1, xVal2, xVal3, xVal4 )
LOCAL oCell
oCell := TOOSCell()
oCell:oSheet := SELF
IF PCount() == 0; RETURN ::ActiveCell(); ENDIF
IF ValType( xVal1 ) == "C"
oCell:oCell := ::oHoja:getCellRangeByName( xVal1 )
ELSE
xVal1 -= 1
xVal2 -= 1
xVal3 -= 1
xVal4 -= 1
oCell:oCell := ::oHoja:getCellRangeByPosition( xVal1, xVal2, xVal3,
xVal4 )
ENDIF
RETURN oCell
/*-----------------------------------------------------------------------------------------------*/
METHOD ActivateSheet( xSheet )
IF ValType( xSheet ) == "N"
::oHoja := ::oaHojas:GetByIndex( xSheet - 1 )
ELSE
IF ::oaHojas:hasByName( xSheet )
::oHoja := ::oaHojas:GetByName( xSheet )
ELSE
MsgInfo( "No Existe la Hoja" + CRLF + xSheet )
ENDIF
ENDIF
::oDoc:getCurrentController():setActiveSheet( ::oHoja )
RETURN NIL
/*-----------------------------------------------------------------------------------------------*/
METHOD Init()
::oaHojas := ::oDoc:getSheets()
::oHoja := ::oDoc:getCurrentController():getActiveSheet()
RETURN NIL
/*-----------------------------------------------------------------------------------------------*/
METHOD InsertSheet( cName, nPos )
DEFAULT nPos := 1
nPos--
::oaHojas:insertNewByName( cName, nPos )
RETURN NIL
/*-----------------------------------------------------------------------------------------------*/
METHOD NameSheet( nHoja )
LOCAL cName
IF nHoja == NIL
cName := ::oHoja:getName()
ELSE
cName := ::oaHojas:GetByIndex( nHoja - 1 ):GetName()
ENDIF
RETURN cName
--------------------------------------------------
From: "Mathias Bauer" <[EMAIL PROTECTED]>
Sent: Monday, March 31, 2008 8:49 AM
To: <[email protected]>
Subject: Re: [dev] developing with Windows
Tor Lillqvist wrote:
Unfortunately, for Windows, the only supported compiler one can use
for OOo work is Microsoft's. I *think* it should be possible to use
the gratis "Express" edition, though.
It definitely is possible to use the Express edition (2005, not 2003). I
do it at home all the time. There are some parts of OOo that can't built
with the Express Edition (ActiveX Control, CLI Bridge IIRC) but you
don't need them for working with OOo or using it for C++ based
development.
Ciao,
Mathias
--
Sun Microsystems GmbH Mathias Bauer
Nagelsweg 55 Manager Software Engineering
20097 Hamburg, Germany Phone: (+49 40)23646 913
http://www.sun.de mailto:[EMAIL PROTECTED]
Sitz der Gesellschaft: D-85551 Kirchheim-Heimstetten
Amtsgericht Muenchen: HRB 161028
Geschaeftsfuehrer: Thomas Schroeder, Wolfgang Engels, Dr. Roland Boemer
Vorsitzender des Aufsichtsrates: Martin Haering
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]