Está en la página 1de 24

Como automatiza una hoja de calculo de Microsoft Excel desde Visual FoxPro

En esta sencilla gua en la que encontrara tips bsicos para automatizar una hoja de clculo,
muchas veces nos hemos encontrado con la necesidad de crear desde los datos de nuestra
aplicacin un documento para un usuario, y por lo general siempre se utiliza Excel.
1. Crear la Hoja de calculo
2 . Manipular la hoja de calculo
2. 1 Insertar una imagen
2.2 Combinar celdas
2.3 Cambiar el formato
2.4 Cambiar el tamao de una fila
2.5 Cambiar el tamao de una columna
2.6 Insertar filas
2.7 Bordes
2.8 Cambiar el color de varias columnas
2.9 Formato numero
2.10 Configurar el area y formato de impression
3 CONSTAES DE EXCEL
4 Ejemplo
5 Descargar constantes
Creacin de la hoja de calculo
Para poder acceder a Excel desde Fox primero tenemos que crear un objeto el cual
podamos manipular a nuestro antojo.
tmpsheet = GetObject('','excel.sheet')
Luego hacemos una referencia a la aplicacin, la cual nos permitir manipular
caractersticas de Excel como por ejemplo que no muestre las lneas de divisin de celdas
XLApp = tmpsheet.application
XLApp.ActiveWindow.DisplayZeros = .f. &&No muestra las celdas en valor 0
XLApp.ActiveWindow.DisplayGridlines = .f. &&No muestra las lneas de divisin
XLApp.Visible = .t. &&Aplicacion visible
XLApp.WorkBooks.Add() &&Agrega una Hoja de calculo
Luego de agregar una hoja de calculo creamos una referencia a esta
XLSheet = XLApp.ActiveSheet

Ahora podemos manipular la hoja de calculo a nuestras necesidades.


Manipularon de la hoja de calculo
Insertar una imagen: muchas veces en nuestras hojas de calculo queremos o necesitamos
inserta una imagen como por ejemplo el logo de la compaa o etc. Esto se hace de la
siguiente manera
XLSheet.Pictures.Insert(FULLPATH("bmp\logo.bmp")) .name="Picture 1"
XLSheet.Pictures.Insert(c:\aplicacion\bmp\logo.bmp") .name="Picture 1"
En el anterior ejemplo insertamos una imagen, en el primer objeto le decimos a Fox que
retorne la ruta completa de una imagen partir de una ruta relativa, en el segundo ejemplo
asignamos la ruta de la imagen, tambin asignamos un nombre al objeto y as podemos
cambiar las caractersticas del objeto como por ejemplo el ancho
XLSheet.Shapes("Picture 1").Width=100
Combinar celdas: Para combinar celdas podemos especificar un rango de celdas asi
XLSheet.Range("F1:J1").Merge
Cambiar el formato: primero necesitamos especificar el rango de celdas a las cuales les
deceamos cambiar el formato, podemos utilizar el comando WITH de Fox asi:
WITH XLSheet.Range("F1:J1")
.Merge
.value='EL TEXTO QUE DESEAMOS MOSTRAR'
.HorizontalAlignment=xlCenter &&Aliniar al centro *
.VerticalAlignment=xlCenter
.Font.Bold=.t.
.Font.Size=14
.Font.Name=Arialbr /> ENDWITH
Las constantes de Excel estan al final de la Gua.
Cambiar el tamao de una fila:
XLSheet.Rows(4).RowHeight=20

Cambiar el tamao de una columna:


XLSheet.Columns("A:A").ColumnWidth=19.57
Ajustar el tamao a todas las columnas:
XLSheet.Columns().AutoFit
Insertar filas:
XLSheet.Rows("1:1").Insert
Bordes: Una forma de insertar bordes es especificar un rango y luego ajustar sus
propiedades segn nuestras necesidades asi:
WITH XLSheet.Range("A4:Q4")
.Borders(xlDiagonalDown).LineStyle = xlNone
.Borders(xlDiagonalUp).LineStyle = xlNone
.Borders(xlEdgeLeft).LineStyle = xlNone
.Borders(xlEdgeTop).LineStyle = xlNone
.Borders(xlEdgeRight).LineStyle = xlNone
.Borders(xlInsideVertical).LineStyle = xlContinuous
.Borders(xlInsideVertical).Weight = xlThin
.Borders(xlInsideVertical).ColorIndex = xlAutomatic
ENDWITH
O tambin asi:
WITH XLSheet.Range("A4:Q4").Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
ENDWITH
Cambiar el color de varias columnas:
XLSheet.Range("H:H;J:J;L:L;N:N;P:P").Font.ColorIndex=42
Formato numero:

XLSheet.Columns("E:Q").NumberFormat = "#,##0"
Configurar el area y formato de impression:
WITH XLSheet.PageSetup
.PrintArea = "$A:$Q" &&Area de Impresion
.PrintTitleRows = "$1:$4" &&Filas como titulo
.PrintTitleColumns = ""
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = "&D &T" &&Pie de pagina fecha y hora
.CenterFooter = ""
.RightFooter = "&P" &&Pie de pagina izquierdo Numero pagina
*Margenes
.LeftMargin = XLApp.InchesToPoints(0.393700787401575)
.RightMargin = XLApp.InchesToPoints(0.393700787401575)
.TopMargin = XLApp.InchesToPoints(0.393700787401575)
.BottomMargin = XLApp.InchesToPoints(0.393700787401575)
.HeaderMargin = XLApp.InchesToPoints(0)
.FooterMargin = XLApp.InchesToPoints(0)
.PrintHeadings = .f.
.PrintGridlines = .f.
.PrintComments = xlPrintNoComments
* Centrar area
.CenterHorizontally = .t.
.CenterVertically = .f.
.Orientation = xlLandscape
.Draft = .f.
.PaperSize = xlPaperLegal
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = .f.
*Imprimir a un %
.Zoom = 80
ENDWITH

Un ejemplo basico seria:


*!* Creo un cursor que es el que ingresare en la hoja de calculo
*!* cargo el campo Numero con aleatorios, el campo texto con sys(2015)
CREATE CURSOR curPrueba (Numero N(10),Texto C(254)) && Creo el curso
FOR lnContador=1 TO 10 && Ingreso 10 Registros aleatorios
INSERT INTO curPrueba(Numero,Texto) values(INT(RAND()*500+1),SYS(2015))
ENDFORA
*!* CREO EL OBJETO DE EXECEL
tmpsheet = GetObject('','excel.sheet')
XLApp = tmpsheet.application
XLApp.ActiveWindow.DisplayZeros = .f. &&No muestra las celdas en valor 0
XLApp.ActiveWindow.DisplayGridlines = .f. &&No muestra las lneas de divisin
XLApp.Visible = .t. &&Aplicacion visible
XLApp.WorkBooks.Add() &&Agrega una Hoja de calculo
XLSheet = XLApp.ActiveSheet
*!* RECORRO EL CURSOR E INGRESO EN EXCEL
GOTO TOP IN curPrueba
SCAN
XLSheet.cells(RECNO('curPrueba'),1)=curPrueba.Numero
XLSheet.cells(RECNO('curPrueba'),2)=ALLTRIM(curPrueba.Texto)
ENDSCAN
*!* FORMATO DE COLUMNAS TITULO
XLSheet.Rows("1:1").Insert
XLSheet.cells(1,1)='NUMERO' && Titulo celda fila 1 y columna 1
XLSheet.cells(1,2)='TEXTO' && Titulo celda fila 1 y columna 2
WITH XLSheet.Range("A1:B1")
.HorizontalAlignment=-4108 && xlCenter &&Aliniar al centro *
.VerticalAlignment=-4108 && xlCenter
.Font.Bold=.t.
.Font.Size=14
.Font.Name='Arial'
ENDWITH
*!* AUSTANDO CELDAS
XLSheet.Columns().AutoFit

Una forma practica a un que poco ortodoxa de manejar las propiedades y mtodos de
Microsoft Excel es haciendo una macro en Excel y Observa su codigo. Unas equivalencias
en codigo son:
Macro de Excel
Range("B3:H21").Select
Selection.NumberFormat =
"#,##0.00"
ActiveWindow

En Fox
XLSheet.Range("A4:Q4")
XLSheet.Range("A4:Q4").NumberFormat = "#,##0.00"
XLApp.ActiveWindow

Constantes de Microsoft Excel


Las constantes de Excel pueden ser guardadas en un archivo .H como por ejemplo XLS.H,
e integrarlas a nuestros programas con #INCLUDE XLS.H, las constantes son:

CONSTAES DE EXCEL
* Colors
#DEFINE xlColorRojo
#DEFINE xlColorAzul

3
47

* Constants
#DEFINE xlDialogSetBackgroundPicture 492
#DEFINE xlDialogAutoCorrect 485
#DEFINE xlDialogFileSharing 481
#DEFINE xlDialogVbaMakeAddin 478
#DEFINE xlDialogActiveCellFont 476
#DEFINE xlDialogFindFile 475
#DEFINE xlDialogProperties 474
#DEFINE xlDialogSummaryInfo 474
#DEFINE xlDialogScenarioMerge 473
#DEFINE xlDialogStandardWidth 472
#DEFINE xlDialogMailEditMailer 470
#DEFINE xlDialogSeriesOrder 466
#DEFINE xlDialogFormatChart 465
#DEFINE xlDialogErrorbarY 464
#DEFINE xlDialogErrorbarX 463
#DEFINE xlDialogSeriesY 462
#DEFINE xlDialogSeriesX 461
#DEFINE xlDialogSeriesAxes 460
#DEFINE xlDialogOptionsListsAdd 458

#DEFINE xlDialogSaveCopyAs 456


#DEFINE xlDialogFunctionWizard 450
#DEFINE xlDialogFilter 447
#DEFINE xlDialogPushbuttonProperties 445
#DEFINE xlDialogOpenText 441
#DEFINE xlDialogEditboxProperties 438
#DEFINE xlDialogListboxProperties 437
#DEFINE xlDialogLabelProperties 436
#DEFINE xlDialogCheckboxProperties 435
#DEFINE xlDialogPivotFieldUngroup 434
#DEFINE xlDialogPivotFieldGroup 433
#DEFINE xlDialogFormatCharttype 423
#DEFINE xlDialogTextToColumns 422
#DEFINE xlDialogPivotShowPages 421
#DEFINE xlDialogScrollbarProperties 420
#DEFINE xlDialogWorkbookProtect 417
#DEFINE xlDialogWorkbookTabSplit 415
#DEFINE xlDialogSubtotalCreate 398
#DEFINE xlDialogTabOrder 394
#DEFINE xlDialogChartAddData 392
#DEFINE xlDialogAddChartAutoformat 390
#DEFINE xlDialogGalleryCustom 388
#DEFINE xlDialogWorkbookName 386
#DEFINE xlDialogWorkbookUnhide 384
#DEFINE xlDialogMacroOptions 382
#DEFINE xlDialogFontProperties 381
#DEFINE xlDialogInsertTitle 380
#DEFINE xlDialogDataLabel 379
#DEFINE xlDialogMailNextLetter 378
#DEFINE xlDialogFilterAdvanced 370
#DEFINE xlDialogOptionsGeneral 356
#DEFINE xlDialogOptionsTransition 355
#DEFINE xlDialogWorkbookInsert 354
#DEFINE xlDialogChartTrend 350
#DEFINE xlDialogGalleryDoughnut 344
#DEFINE xlDialogInsertPicture 342
#DEFINE xlDialogMailLogon 339
#DEFINE xlDialogRoutingSlip 336
#DEFINE xlDialogVbaProcedureDefinition 330
#DEFINE xlDialogVbaInsertFile 328
#DEFINE xlDialogOptionsChart 325
#DEFINE xlDialogAttachToolbars 323
#DEFINE xlDialogMenuEditor 322
#DEFINE xlDialogAddinManager 321
#DEFINE xlDialogOptionsView 320

#DEFINE xlDialogOptionsEdit 319


#DEFINE xlDialogOptionsCalculation 318
#DEFINE xlDialogPivotFieldProperties 313
#DEFINE xlDialogPivotTableWizard 312
#DEFINE xlDialogScenarioSummary 311
#DEFINE xlDialogScenarioEdit 308
#DEFINE xlDialogScenarioAdd 307
#DEFINE xlDialogScenarioCells 305
#DEFINE xlDialogWorkbookNew 302
#DEFINE xlDialogFillWorkgroup 301
#DEFINE xlDialogPlacement 300
#DEFINE xlDialogAssignToTool 293
#DEFINE xlDialogChartWizard 288
#DEFINE xlDialogSaveWorkspace 285
#DEFINE xlDialogWorkbookOptions 284
#DEFINE xlDialogWorkbookCopy 283
#DEFINE xlDialogWorkbookMove 282
#DEFINE xlDialogWorkbookAdd 281
#DEFINE xlDialogCustomizeToolbar 276
#DEFINE xlDialogGallery3dSurface 273
#DEFINE xlDialogGallery3dBar 272
#DEFINE xlDialogFormatAuto 269
#DEFINE xlDialogMove 262
#DEFINE xlDialogSize 261
#DEFINE xlDialogInsertObject 259
#DEFINE xlDialogZoom 256
#DEFINE xlDialogEditionOptions 251
#DEFINE xlDialogGalleryRadar 249
#DEFINE xlDialogDefineStyle 229
#DEFINE xlDialogEditSeries 228
#DEFINE xlDialogFormatOverlay 226
#DEFINE xlDialogFormatMain 225
#DEFINE xlDialogEditColor 223
#DEFINE xlDialogPrintPreview 222
#DEFINE xlDialogShowToolbar 220
#DEFINE xlDialogSubscribeTo 218
#DEFINE xlDialogCreatePublisher 217
#DEFINE xlDialogObjectProtection 214
#DEFINE xlDialogAssignToObject 213
#DEFINE xlDialogApplyStyle 212
#DEFINE xlDialogSaveNewObject 208
#DEFINE xlDialogObjectProperties 207
#DEFINE xlDialogShowDetail 204
#DEFINE xlDialogDemote 203
#DEFINE xlDialogPromote 202

#DEFINE xlDialogUpdateLink 201


#DEFINE xlDialogFillGroup 200
#DEFINE xlDialogWorkgroup 199
#DEFINE xlDialogGoalSeek 198
#DEFINE xlDialogView3d 197
#DEFINE xlDialogGallery3dPie 196
#DEFINE xlDialogGallery3dLine 195
#DEFINE xlDialogGallery3dColumn 194
#DEFINE xlDialogGallery3dArea 193
#DEFINE xlDialogSortSpecial 192
#DEFINE xlDialogConsolidate 191
#DEFINE xlDialogStandardFont 190
#DEFINE xlDialogSendMail 189
#DEFINE xlDialogOpenMail 188
#DEFINE xlDialogOverlayChartType 186
#DEFINE xlDialogMainChartType 185
#DEFINE xlDialogAppSize 171
#DEFINE xlDialogAppMove 170
#DEFINE xlDialogChangeLink 166
#DEFINE xlDialogColorPalette 161
#DEFINE xlDialogSetUpdateStatus 159
#DEFINE xlDialogNote 154
#DEFINE xlDialogFormatFont 150
#DEFINE xlDialogCopyChart 147
#DEFINE xlDialogSaveWorkbook 145
#DEFINE xlDialogOutline 142
#DEFINE xlDialogSplit 137
#DEFINE xlDialogReplaceFont 134
#DEFINE xlDialogApplyNames 133
#DEFINE xlDialogSelectSpecial 132
#DEFINE xlDialogFormulaReplace 130
#DEFINE xlDialogFormatSize 129
#DEFINE xlDialogFormatMove 128
#DEFINE xlDialogRowHeight 127
#DEFINE xlDialogNew 119
#DEFINE xlDialogDeleteFormat 111
#DEFINE xlDialogDeleteName 110
#DEFINE xlDialogCopyPicture 108
#DEFINE xlDialogActivate 103
#DEFINE xlDialogWorkspace 95
#DEFINE xlDialogUnhide 94
#DEFINE xlDialogParse 91
#DEFINE xlDialogFormatText 89
#DEFINE xlDialogFormatLegend 88
#DEFINE xlDialogScale 87

#DEFINE xlDialogOverlay 86
#DEFINE xlDialogMainChart 85
#DEFINE xlDialogPatterns 84
#DEFINE xlDialogAttachText 80
#DEFINE xlDialogAxes 78
#DEFINE xlDialogGridlines 76
#DEFINE xlDialogCombination 73
#DEFINE xlDialogGalleryScatter 72
#DEFINE xlDialogGalleryPie 71
#DEFINE xlDialogGalleryLine 70
#DEFINE xlDialogGalleryColumn 69
#DEFINE xlDialogGalleryBar 68
#DEFINE xlDialogGalleryArea 67
#DEFINE xlDialogFormulaFind 64
#DEFINE xlDialogFormulaGoto 63
#DEFINE xlDialogCreateNames 62
#DEFINE xlDialogDefineName 61
#DEFINE xlDialogInsert 55
#DEFINE xlDialogEditDelete 54
#DEFINE xlDialogPasteSpecial 53
#DEFINE xlDialogClear 52
#DEFINE xlDialogColumnWidth 47
#DEFINE xlDialogCellProtection 46
#DEFINE xlDialogBorder 45
#DEFINE xlDialogStyle 44
#DEFINE xlDialogAlignment 43
#DEFINE xlDialogFormatNumber 42
#DEFINE xlDialogTable 41
#DEFINE xlDialogDataSeries 40
#DEFINE xlDialogSort 39
#DEFINE xlDialogDataDelete 36
#DEFINE xlDialogExtract 35
#DEFINE xlDialogCalculation 32
#DEFINE xlDialogProtectDocument 28
#DEFINE xlDialogDisplay 27
#DEFINE xlDialogFont 26
#DEFINE xlDialogSetPrintTitles 23
#DEFINE xlDialogRun 17
#DEFINE xlDialogWindowMove 14
#DEFINE xlDialogWindowSize 13
#DEFINE xlDialogArrangeAll 12
#DEFINE xlDialogPrinterSetup 9
#DEFINE xlDialogPrint 8
#DEFINE xlDialogPageSetup 7
#DEFINE xlDialogFileDelete 6

#DEFINE xlDialogSaveAs 5
#DEFINE xlDialogOpenLinks 2
#DEFINE xlDialogOpen 1
#DEFINE xlZero 2
#DEFINE xlYes 1
#DEFINE xlYearCode 19
#DEFINE xlYear 4
#DEFINE xlY 1
#DEFINE xlXYScatter -4169
#DEFINE xlX -4168
#DEFINE xlWQ1 34
#DEFINE xlWPG 3
#DEFINE xlWorksheetShort 5
#DEFINE xlWorksheetCell 3
#DEFINE xlWorksheet4 1
#DEFINE xlWorksheet -4167
#DEFINE xlWorks2FarEast 28
#DEFINE xlWorkbookTab 6
#DEFINE xlWorkbook 1
#DEFINE xlWMF 2
#DEFINE xlWKS 4
#DEFINE xlWK3FM3 32
#DEFINE xlWK3 15
#DEFINE xlWK1FMT 30
#DEFINE xlWK1ALL 31
#DEFINE xlWK1 5
#DEFINE xlWJ2WD1 14
#DEFINE xlWindows 2
#DEFINE xlWide 3
#DEFINE xlWhole 1
#DEFINE xlWeekdayNameChars 31
#DEFINE xlWeekday 2
#DEFINE xlWatchPane 11
#DEFINE xlWait 2
#DEFINE xlVisible 12
#DEFINE xlVeryHidden 2
#DEFINE xlVertical -4166
#DEFINE xlVarP -4165
#DEFINE xlVar -4164
#DEFINE xlValues -4163
#DEFINE xlValue2
#DEFINE xlVALU 8
#DEFINE xlUserResolution 1
#DEFINE xlUpward -4171
#DEFINE xlUpperCaseRowLetter 6

#DEFINE xlUpperCaseColumnLetter 7
#DEFINE xlUpdateSubscriber 2
#DEFINE xlUpdateState 1
#DEFINE xlUp -4162
#DEFINE xlTriangle 3
#DEFINE xlTransparent 2
#DEFINE xlToRight -4161
#DEFINE xlTopToBottom 1
#DEFINE xlTop10Percent 5
#DEFINE xlTop10Items 3
#DEFINE xlTop -4160
#DEFINE xlToolbarButton 2
#DEFINE xlToolbar 1
#DEFINE xlToLeft -4159
#DEFINE xlTitleBar 8
#DEFINE xlTimeSeparator 18
#DEFINE xlTimeLeadingZero 45
#DEFINE xlTiled 1
#DEFINE xlTIF 9
#DEFINE xlThousandsSeparator 4
#DEFINE xlThin 2
#DEFINE xlThick 4
#DEFINE xlTextWindows 20
#DEFINE xlTextValues 2
#DEFINE xlTextPrinter 36
#DEFINE xlTextMSDOS 21
#DEFINE xlTextMac 19
#DEFINE xlTextBox 16
#DEFINE xlText -4158
#DEFINE xlTemplate 17
#DEFINE xlTableBody 8
#DEFINE xlSyllabary 1
#DEFINE xlSYLK 2
#DEFINE xlSum -4157
#DEFINE xlSubtract 3
#DEFINE xlSubscribers 6
#DEFINE xlSubscriber 2
#DEFINE xlStrict 2
#DEFINE xlStretch 1
#DEFINE xlStError 4
#DEFINE xlStDevP -4156
#DEFINE xlStDev -4155
#DEFINE xlStar 5
#DEFINE xlStandardSummary 1
#DEFINE xlStack 2

#DEFINE xlSquare 1
#DEFINE xlSortValues 1
#DEFINE xlSortLabels 2
#DEFINE xlSolid 1
#DEFINE xlSingleQuote 2
#DEFINE xlSingleAccounting 4
#DEFINE xlSingle 2
#DEFINE xlSimple -4154
#DEFINE xlShowValue 2
#DEFINE xlShowPercent 3
#DEFINE xlShowLabelAndPercent 5
#DEFINE xlShowLabel 4
#DEFINE xlShort 1
#DEFINE xlShared 2
#DEFINE xlSeries 3
#DEFINE xlSendPublisher 2
#DEFINE xlSemiGray75 10
#DEFINE xlSemiautomatic 2
#DEFINE xlSelect 3
#DEFINE xlSecondCode 24
#DEFINE xlSecondary 2
#DEFINE xlScreenSize 1
#DEFINE xlScreen 1
#DEFINE xlScale 3
#DEFINE xlRunningTotal 5
#DEFINE xlRTF 4
#DEFINE xlRowThenColumn 1
#DEFINE xlRowSeparator 15
#DEFINE xlRows 1
#DEFINE xlRowItem 4
#DEFINE xlRowHeader -4153
#DEFINE xlRowField 1
#DEFINE xlRoutingInProgress 1
#DEFINE xlRoutingComplete 2
#DEFINE xlRightBracket 11
#DEFINE xlRightBrace 13
#DEFINE xlRight -4152
#DEFINE xlRelRowAbsColumn 3
#DEFINE xlRelative 4
#DEFINE xlReference 4
#DEFINE xlReadWrite 2
#DEFINE xlReadOnly 3
#DEFINE xlRadar -4151
#DEFINE xlR1C1 -4150
#DEFINE xlPublishers 5

#DEFINE xlPublisher 1
#DEFINE xlProduct -4149
#DEFINE xlPrinter 2
#DEFINE xlPrimary 1
#DEFINE xlPrevious 2
#DEFINE xlPowerTalk 2
#DEFINE xlPower 4
#DEFINE xlPortrait 1
#DEFINE xlPolynomial 3
#DEFINE xlPlusValues 2
#DEFINE xlPlus 9
#DEFINE xlPLT 12
#DEFINE xlPlotArea 19
#DEFINE xlPlaceholders 2
#DEFINE xlPivotTable -4148
#DEFINE xlPie 5
#DEFINE xlPicture -4147
#DEFINE xlPICT 1
#DEFINE xlPIC 11
#DEFINE xlPercentOfTotal 8
#DEFINE xlPercentOfRow 6
#DEFINE xlPercentOfColumn 7
#DEFINE xlPercentOf 3
#DEFINE xlPercentDifferenceFrom 4
#DEFINE xlPercent 2
#DEFINE xlPCX 10
#DEFINE xlPCT 13
#DEFINE xlPart 2
#DEFINE xlPaperUser 256
#DEFINE xlPaperTabloid 3
#DEFINE xlPaperStatement 6
#DEFINE xlPaperQuarto 15
#DEFINE xlPaperNote 18
#DEFINE xlPaperLetterSmall 2
#DEFINE xlPaperLetter 1
#DEFINE xlPaperLegal 5
#DEFINE xlPaperLedger 4
#DEFINE xlPaperFolio 14
#DEFINE xlPaperFanfoldUS 39
#DEFINE xlPaperFanfoldStdGerman 40
#DEFINE xlPaperFanfoldLegalGerman 41
#DEFINE xlPaperExecutive 7
#DEFINE xlPaperEsheet 26
#DEFINE xlPaperEnvelopePersonal 38
#DEFINE xlPaperEnvelopeMonarch 37

#DEFINE xlPaperEnvelopeItaly 36
#DEFINE xlPaperEnvelopeDL 27
#DEFINE xlPaperEnvelopeC65 32
#DEFINE xlPaperEnvelopeC6 31
#DEFINE xlPaperEnvelopeC5 28
#DEFINE xlPaperEnvelopeC4 30
#DEFINE xlPaperEnvelopeC3 29
#DEFINE xlPaperEnvelopeB6 35
#DEFINE xlPaperEnvelopeB5 34
#DEFINE xlPaperEnvelopeB4 33
#DEFINE xlPaperEnvelope9 19
#DEFINE xlPaperEnvelope14 23
#DEFINE xlPaperEnvelope12 22
#DEFINE xlPaperEnvelope11 21
#DEFINE xlPaperEnvelope10 20
#DEFINE xlPaperDsheet 25
#DEFINE xlPaperCsheet 24
#DEFINE xlPaperB5 13
#DEFINE xlPaperB4 12
#DEFINE xlPaperA5 11
#DEFINE xlPaperA4Small 10
#DEFINE xlPaperA4 9
#DEFINE xlPaperA3 8
#DEFINE xlPaper11x17 17
#DEFINE xlPaper10x14 16
#DEFINE xlPageItem 6
#DEFINE xlPageHeader 2
#DEFINE xlPageField 3
#DEFINE xlOverThenDown 2
#DEFINE xlOutside 3
#DEFINE xlOtherSessionChanges 3
#DEFINE xlOr 2
#DEFINE xlOpenSource 3
#DEFINE xlOpen 2
#DEFINE xlOpaque 3
#DEFINE xlOneAfterAnother 1
#DEFINE xlOn 1
#DEFINE xlOLELinks 2
#DEFINE xlOLELink 0
#DEFINE xlOLEEmbed 1
#DEFINE xlOff -4146
#DEFINE xlNumbers 1
#DEFINE xlNumber -4145
#DEFINE xlNotYetRouted 0
#DEFINE xlNotPlotted 1

#DEFINE xlNotes -4144


#DEFINE xlNoShapeChanges 2
#DEFINE xlNorthwestArrow 1
#DEFINE xlNormal -4143
#DEFINE xlNonEnglishFunctions 34
#DEFINE xlNone -4142
#DEFINE xlNoncurrencyDigits 29
#DEFINE xlNoMailSystem 0
#DEFINE xlNoDocuments 3
#DEFINE xlNoDockingChanges 3
#DEFINE xlNoChanges 4
#DEFINE xlNoChange 1
#DEFINE xlNoCap 2
#DEFINE xlNoButtonChanges 1
#DEFINE xlNo 2
#DEFINE xlNextToAxis 4
#DEFINE xlNext 1
#DEFINE xlNarrow 1
#DEFINE xlMultiply 4
#DEFINE xlMSDOS 3
#DEFINE xlMovingAvg 6
#DEFINE xlMoveAndSize 1
#DEFINE xlMove 2
#DEFINE xlMonthNameChars 30
#DEFINE xlMonthLeadingZero 41
#DEFINE xlMonthCode 20
#DEFINE xlMonth 3
#DEFINE xlModule -4141
#DEFINE xlMixed 2
#DEFINE xlMinuteCode 23
#DEFINE xlMinusValues 3
#DEFINE xlMinimum 2
#DEFINE xlMinimized -4140
#DEFINE xlMin -4139
#DEFINE xlMicrosoftWord 1
#DEFINE xlMicrosoftSchedulePlus 7
#DEFINE xlMicrosoftProject 6
#DEFINE xlMicrosoftPowerPoint 2
#DEFINE xlMicrosoftMail 3
#DEFINE xlMicrosoftFoxPro 5
#DEFINE xlMicrosoftAccess 4
#DEFINE xlMetric 35
#DEFINE xlMedium -4138
#DEFINE xlMDY 44
#DEFINE xlMaximum 2

#DEFINE xlMaximized -4137


#DEFINE xlMax -4136
#DEFINE xlMAPI 1
#DEFINE xlManualUpdate 5
#DEFINE xlManual -4135
#DEFINE xlMacrosheetCell 7
#DEFINE xlMacintosh 1
#DEFINE xlLowerCaseRowLetter 8
#DEFINE xlLowerCaseColumnLetter 9
#DEFINE xlLow -4134
#DEFINE xlLotusHelp 2
#DEFINE xlLong 3
#DEFINE xlLogical 4
#DEFINE xlLogarithmic -4133
#DEFINE xlLocalSessionChanges 2
#DEFINE xlLocalFormat2 16
#DEFINE xlLocalFormat1 15
#DEFINE xlListSeparator 5
#DEFINE xlList3 12
#DEFINE xlList2 11
#DEFINE xlList1 10
#DEFINE xlLinearTrend 9
#DEFINE xlLinear -4132
#DEFINE xlLine 4
#DEFINE xlLightVertical 12
#DEFINE xlLightUp 14
#DEFINE xlLightHorizontal 11
#DEFINE xlLightDown 13
#DEFINE xlLegend 24
#DEFINE xlLeftToRight 2
#DEFINE xlLeftBracket 10
#DEFINE xlLeftBrace 12
#DEFINE xlLeft -4131
#DEFINE xlLastCell 11
#DEFINE xlLast 1
#DEFINE xlLandscape 2
#DEFINE xlJustify -4130
#DEFINE xlIntlMacro 25
#DEFINE xlIntlAddIn 26
#DEFINE xlInterrupt 1
#DEFINE xlInterpolated 3
#DEFINE xlInteger 2
#DEFINE xlInside 2
#DEFINE xlInfo -4129
#DEFINE xlIndex 9

#DEFINE xlImmediatePane 12
#DEFINE xlIcons 1
#DEFINE xlIBeam 3
#DEFINE xlHourCode 22
#DEFINE xlHorizontal -4128
#DEFINE xlHigh -4127
#DEFINE xlHide 3
#DEFINE xlHidden 0
#DEFINE xlHGL 6
#DEFINE xlHairline 1
#DEFINE xlGuess 0
#DEFINE xlGrowthTrend 10
#DEFINE xlGrowth 2
#DEFINE xlGridline 22
#DEFINE xlGrid 15
#DEFINE xlGray8 18
#DEFINE xlGray75 -4126
#DEFINE xlGray50 -4125
#DEFINE xlGray25 -4124
#DEFINE xlGray16 17
#DEFINE xlGeneralFormatName 26
#DEFINE xlGeneral 1
#DEFINE xlFunction 1
#DEFINE xlFullPage 3
#DEFINE xlFreeFloating 3
#DEFINE xlFormulas -4123
#DEFINE xlFormula 5
#DEFINE xlFormats -4122
#DEFINE xlFloor 23
#DEFINE xlFloating 5
#DEFINE xlFixedWidth 2
#DEFINE xlFixedValue 1
#DEFINE xlFitToPage 2
#DEFINE xlFirst 0
#DEFINE xlFilterInPlace 1
#DEFINE xlFilterCopy 2
#DEFINE xlFillYears 8
#DEFINE xlFillWeekdays 6
#DEFINE xlFillValues 4
#DEFINE xlFillSeries 2
#DEFINE xlFillMonths 7
#DEFINE xlFillFormats 3
#DEFINE xlFillDefault 0
#DEFINE xlFillDays 5
#DEFINE xlFillCopy 1

#DEFINE xlFill 5
#DEFINE xlExternal 2
#DEFINE xlExtended 3
#DEFINE xlExponential 5
#DEFINE xlExclusive 3
#DEFINE xlExcelMenus 1
#DEFINE xlExcelLinks 1
#DEFINE xlExcel4Workbook 35
#DEFINE xlExcel4MacroSheet 3
#DEFINE xlExcel4IntlMacroSheet 4
#DEFINE xlExcel4 33
#DEFINE xlExcel3 29
#DEFINE xlExcel2FarEast 27
#DEFINE xlExcel2 16
#DEFINE xlErrValue 2015
#DEFINE xlErrRef 2023
#DEFINE xlErrors 16
#DEFINE xlErrorHandler 2
#DEFINE xlErrNum 2036
#DEFINE xlErrNull 2000
#DEFINE xlErrName 2029
#DEFINE xlErrNA 2042
#DEFINE xlErrDiv0 2007
#DEFINE xlEPS 8
#DEFINE xlEntireChart 20
#DEFINE xlEditionDate 2
#DEFINE xlDXF 5
#DEFINE xlDRW 4
#DEFINE xlDrawingObject 14
#DEFINE xlDownward -4170
#DEFINE xlDownThenOver 1
#DEFINE xlDown -4121
#DEFINE xlDoughnut -4120
#DEFINE xlDoubleQuote 1
#DEFINE xlDoubleOpen 4
#DEFINE xlDoubleClosed 5
#DEFINE xlDoubleAccounting 5
#DEFINE xlDouble -4119
#DEFINE xlDot -4118
#DEFINE xlDivide 5
#DEFINE xlDistributed -4117
#DEFINE xlDisabled 0
#DEFINE xlDirect 1
#DEFINE xlDifferenceFrom 2
#DEFINE xlDIF 9

#DEFINE xlDiamond 2
#DEFINE xlDialogSheet -4116
#DEFINE xlDesktop 9
#DEFINE xlDescending 2
#DEFINE xlDelimited 1
#DEFINE xlDefaultAutoFormat -1
#DEFINE xlDecimalSeparator 3
#DEFINE xlDebugCodePane 13
#DEFINE xlDBF4 11
#DEFINE xlDBF3 8
#DEFINE xlDBF2 7
#DEFINE xlDayLeadingZero 42
#DEFINE xlDayCode 21
#DEFINE xlDay 1
#DEFINE xlDateSeparator 17
#DEFINE xlDateOrder 32
#DEFINE xlDate 2
#DEFINE xlDataItem 7
#DEFINE xlDataHeader 3
#DEFINE xlDataField 4
#DEFINE xlDatabase 1
#DEFINE xlDashDotDot 5
#DEFINE xlDashDot 4
#DEFINE xlDash -4115
#DEFINE xlCut 2
#DEFINE xlCustom -4114
#DEFINE xlCurrencyTrailingZeros 39
#DEFINE xlCurrencySpaceBefore 36
#DEFINE xlCurrencyNegative 28
#DEFINE xlCurrencyMinusSign 38
#DEFINE xlCurrencyLeadingZeros 40
#DEFINE xlCurrencyDigits 27
#DEFINE xlCurrencyCode 25
#DEFINE xlCurrencyBefore 37
#DEFINE xlCSVWindows 23
#DEFINE xlCSVMSDOS 24
#DEFINE xlCSVMac 22
#DEFINE xlCSV 6
#DEFINE xlCross 4
#DEFINE xlCrissCross 16
#DEFINE xlCountrySetting 2
#DEFINE xlCountryCode 1
#DEFINE xlCountNums -4113
#DEFINE xlCount -4112
#DEFINE xlCorner 2

#DEFINE xlCopy 1
#DEFINE xlContinuous 1
#DEFINE xlContents 2
#DEFINE xlConstants 2
#DEFINE xlConsolidation 3
#DEFINE xlCommand 2
#DEFINE xlCombination -4111
#DEFINE xlColumnThenRow 2
#DEFINE xlColumnSeparator 14
#DEFINE xlColumns 2
#DEFINE xlColumnItem 5
#DEFINE xlColumnHeader -4110
#DEFINE xlColumnField 2
#DEFINE xlColumn 3
#DEFINE xlColor3 9
#DEFINE xlColor2 8
#DEFINE xlColor1 7
#DEFINE xlCodePage 2
#DEFINE xlClosed 3
#DEFINE xlClipboardFormatWK1 10
#DEFINE xlClipboardFormatVALU 1
#DEFINE xlClipboardFormatToolFacePICT 26
#DEFINE xlClipboardFormatToolFace 25
#DEFINE xlClipboardFormatText 0
#DEFINE xlClipboardFormatTable 16
#DEFINE xlClipboardFormatSYLK 6
#DEFINE xlClipboardFormatStandardScale 27
#DEFINE xlClipboardFormatStandardFont 28
#DEFINE xlClipboardFormatScreenPICT 29
#DEFINE xlClipboardFormatRTF 7
#DEFINE xlClipboardFormatPrintPICT 3
#DEFINE xlClipboardFormatPICT 2
#DEFINE xlClipboardFormatOwnerLink 17
#DEFINE xlClipboardFormatObjectLink 19
#DEFINE xlClipboardFormatObjectDesc 31
#DEFINE xlClipboardFormatNative 14
#DEFINE xlClipboardFormatMovie 24
#DEFINE xlClipboardFormatLinkSourceDesc 32
#DEFINE xlClipboardFormatLinkSource 23
#DEFINE xlClipboardFormatLink 11
#DEFINE xlClipboardFormatEmbedSource 22
#DEFINE xlClipboardFormatEmbeddedObject 21
#DEFINE xlClipboardFormatDspText 12
#DEFINE xlClipboardFormatDIF 4
#DEFINE xlClipboardFormatCSV 5

#DEFINE xlClipboardFormatCGM 13
#DEFINE xlClipboardFormatBitmap 9
#DEFINE xlClipboardFormatBinary 15
#DEFINE xlClipboardFormatBIFF4 30
#DEFINE xlClipboardFormatBIFF3 20
#DEFINE xlClipboardFormatBIFF2 18
#DEFINE xlClipboardFormatBIFF 8
#DEFINE xlClipboard 3
#DEFINE xlClassic3 3
#DEFINE xlClassic2 2
#DEFINE xlClassic1 1
#DEFINE xlCircle 8
#DEFINE xlChronological 3
#DEFINE xlChecker 9
#DEFINE xlChartTitles 18
#DEFINE xlChartShort 6
#DEFINE xlChartSeries 17
#DEFINE xlChartInPlace 4
#DEFINE xlChartAsWindow 5
#DEFINE xlChart4 2
#DEFINE xlChart -4109
#DEFINE xlChangeAttributes 6
#DEFINE xlCGM 7
#DEFINE xlCenterAcrossSelection 7
#DEFINE xlCenter -4108
#DEFINE xlCategory 1
#DEFINE xlCascade 7
#DEFINE xlCap 1
#DEFINE xlCancel 1
#DEFINE xlByRows 1
#DEFINE xlByColumns 2
#DEFINE xlButton 15
#DEFINE xlBuiltIn 0
#DEFINE xlBottom10Percent 6
#DEFINE xlBottom10Items 4
#DEFINE xlBottom -4107
#DEFINE xlBoth 1
#DEFINE xlBMP 1
#DEFINE xlBlanks 4
#DEFINE xlBitmap 2
#DEFINE xlBIFF 2
#DEFINE xlBelow 1
#DEFINE xlBar 2
#DEFINE xlAxis 21
#DEFINE xlAverage -4106

#DEFINE xlAutoOpen 1
#DEFINE xlAutomaticUpdate 4
#DEFINE xlAutomatic -4105
#DEFINE xlAutoFill 4
#DEFINE xlAutoDeactivate 4
#DEFINE xlAutoClose 2
#DEFINE xlAutoActivate 3
#DEFINE xlAscending 1
#DEFINE xlArea 1
#DEFINE xlAnd 1
#DEFINE xlAlternateArraySeparator 16
#DEFINE xlAllExceptBorders 6
#DEFINE xlAllAtOnce 2
#DEFINE xlAll -4104
#DEFINE xlAddIn 18
#DEFINE xlAdd 2
#DEFINE xlAccounting4 17
#DEFINE xlAccounting3 6
#DEFINE xlAccounting2 5
#DEFINE xlAccounting1 4
#DEFINE xlAbsRowRelColumn 2
#DEFINE xlAbsolute 1
#DEFINE xlAbove 0
#DEFINE xlA1 1
#DEFINE xl4DigitYears 43
#DEFINE xl3DSurface -4103
#DEFINE xl3DPie -4102
#DEFINE xl3DLine -4101
#DEFINE xl3DEffects2 14
#DEFINE xl3DEffects1 13
#DEFINE xl3DColumn -4100
#DEFINE xl3DBar -4099
#DEFINE xl3DArea -4098
#DEFINE xl24HourClock 33
* Constants XLS 2000
#DEFINE xlAutomatic
-4105
#DEFINE xlCenter
-4108
#DEFINE xlLeft
-4131
#DEFINE xlMedium
-4138
#DEFINE xlNone
-4142
#DEFINE xlPrintNoComments -4142
#DEFINE xlContinuous
1
#DEFINE xlDownThenOver
1
#DEFINE xlPaperLetter
1

#DEFINE xlLandscape
#DEFINE xlThin
#DEFINE xlThick
#DEFINE xlDiagonalDown
#DEFINE xlPaperLegal
#DEFINE xlDiagonalUp
#DEFINE xlEdgeLeft
#DEFINE xlEdgeTop
#DEFINE xlEdgeBottom
#DEFINE xlEdgeRight
#DEFINE xlInsideVertical
#DEFINE xlColorRojo
#DEFINE xlColorAzul

2
2
4
5
5
6
7
8
9
10
11
3