XLS en Rpreview

XLS en Rpreview

Postby pedroluis » Mon Aug 28, 2023 6:55 pm

Hola Gente !

Cuando genero un listado y pulso el botón de generar XLS me sale el mensaje
"Excel no está instalado", ¿ les ha pasado ?

Gracias !
Pedro L. Lavallen
San Luis (Capital), Argentina
User avatar
pedroluis
 
Posts: 99
Joined: Sun Oct 08, 2017 12:51 pm
Location: San Luis (Capital), Argentina

Re: XLS en Rpreview

Postby cmsoft » Mon Aug 28, 2023 8:45 pm

Pedro, y tienes instalado Excel en ese equipo?
Porque lo que hace la clase report es:
Code: Select all  Expand view
oExcel   := ExcelObj()
   CursorArrow()
   if oExcel == nil
      lExcelInstalled   := .f.
      MsgAlert( FWString( "Excel not installed" ), FWString( "Alert" ) )
      return self
   endif

Y el objeto Excel lo genera con la funcion ExcelObj que esta en source\function\olefuncs.prg
Code: Select all  Expand view

function ExcelObj();   return FWGetOleObject( "Excel.Application",  @lExcel )
function FWGetOleObject( cApp, lInstalled )  // @lInstalled

   local oObj

   if lInstalled != .f.
      TRY
         oObj  := GetActiveObject( cApp )
      CATCH
         TRY
            oObj  := CreateObject( cApp )
         CATCH
         END
      END
      lInstalled  := ( oObj != nil )
   endif

return oObj
 
User avatar
cmsoft
 
Posts: 1189
Joined: Wed Nov 16, 2005 9:14 pm
Location: Mercedes - Bs As. Argentina

Re: XLS en Rpreview

Postby pedroluis » Mon Aug 28, 2023 9:40 pm

Hola CmSoft !
Gracias por responder.
Si, obviamente tengo instalado el excel.
Me olvidé de postearlo al principio.
Abrazo !
Pedro L. Lavallen
San Luis (Capital), Argentina
User avatar
pedroluis
 
Posts: 99
Joined: Sun Oct 08, 2017 12:51 pm
Location: San Luis (Capital), Argentina

Re: XLS en Rpreview

Postby pedroluis » Mon Aug 28, 2023 10:35 pm

Hola !
Problema resuelto.
Solamente tenía que reparar el Office con ayuda del siguiente link:
https://support.microsoft.com/es-es/off ... b40c5bb88b

Por ahora funciona bien, pero ésto me ha sucedido otras veces.
Bueno, pero si lo puede reparar y funciona todo OK.
El Office que tengo es el 'Microsoft OffIce Pro Plus 2021 LTSC', el que te dejan bajar desde Microsoft.
Por si a alguien le sucede ya tienen el link de como repararlo.

NOTA: el cartelito de 'Excel no está instalado' solamente me salía cuando pulsaba el botón de XLS del preview,
pero si entraba al Excel por afuera, es decir abriendo cualquier otro XLS no había ningún problema.
Me parrece que del FWH está haciendo algo raro. O tal vez algún problema de configuración del Excel. (???)

Saludos !
Pedro L. Lavallen
San Luis (Capital), Argentina
User avatar
pedroluis
 
Posts: 99
Joined: Sun Oct 08, 2017 12:51 pm
Location: San Luis (Capital), Argentina

Re: XLS en Rpreview

Postby cmsoft » Mon Aug 28, 2023 10:52 pm

Genial Pedro, me alegro que lo hayas resuelto!
Y gracias por el link!
User avatar
cmsoft
 
Posts: 1189
Joined: Wed Nov 16, 2005 9:14 pm
Location: Mercedes - Bs As. Argentina


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 85 guests