Tregistry(open Key)
Publicado: Dom Mar 18, 2012 1:59 am
Hi ,
I'm experienced an error since i upgraded 2.0 to 2.5 version
In version 2.0 i could determine Excel Version with this Method
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
After Upgrading to Xailer 2.5 , the program can't identified the Excel 2010 version , But the key exists on the registry.
In version 2.0 the app identifies correctly the key.
What is more strange that it identifies Excel 2007 ok.
Office 2010 is 64b .
Regards
Pedro
I'm experienced an error since i upgraded 2.0 to 2.5 version
In version 2.0 i could determine Excel Version with this Method
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
After Upgrading to Xailer 2.5 , the program can't identified the Excel 2010 version , But the key exists on the registry.
In version 2.0 the app identifies correctly the key.
What is more strange that it identifies Excel 2007 ok.
Office 2010 is 64b .
Regards
Pedro