In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.

Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.

problem with Tregistry(open Key)

Xailer English public forum
psfaro
Mensajes: 2
Registrado: Dom Sep 04, 2011 11:41 am

problem with Tregistry(open Key)

Mensaje por psfaro »

Hi ,
I'm experienced an error after upgrading 2.0 to Xailer 2.5
I used the Method to Determine the excel Extension
METHOD ExcelExtensao() CLASS Copia2XLS
Local oWinReg
Local cExt
Local cFile
With Object oWinReg := TRegistry():New()
:Root := HKEY_LOCAL_MACHINE
DO CASE
CASE :OpenKey("SOFTWAREMicrosoftOffice11.0ExcelInstallRoot ") == 0
//cFile := :GetString("Path") + "EXCEL.EXE"
vExcel:="2003"
cExt := ".XLS"
CASE :OpenKey("SOFTWAREMicrosoftOffice12.0ExcelInstallRoot ") == 0
//cFile := :GetString("Path") + "EXCEL.EXE"
vExcel:="2007"
cExt := ".XLSX"
CASE :OpenKey("SOFTWAREMicrosoftOffice14.0ExcelInstallRoot ",0) == 0
vExcel:="2010"
cExt := ".XLSX"
OTHERWISE
vExcel:="2007"
cExt := ".XLSX"
ENDCASE
End With
Return cExt
In Xailer 2.5, the Excel 2010 , the openKey returns 2
In Xailer 2.0, the Excel 2010 , the openKey returns 0 , wich is ok.
Office 2010 is 64b
Regards
Pedro
Responder