Excel/VBA Documentation for MInigui

178 views
Skip to first unread message

Ronaldo Geniais

unread,
May 23, 2021, 2:19:38 PM5/23/21
to Harbour Users
where can I find documentation with the list of ole / vba methods used to generate excel using the minigui code?

in addition to excell, I'm trying to generate an integration with powerbi


i used samples,
I need more...

oExcel:WorkBooks:Add()
oExcel:Sheets(1):Select()
oHoja := oExcel:ActiveSheet()
oHoja:Cells:Font:Name := "Arial"
oHoja:Cells:Font:Size := 10

oHoja:Range("A1:D1"):Merge() 
oHoja:Range("A2:D2"):HorizontalAlignment := -4108

oChart := oExcel:Charts:Add()




.....


hherrera

unread,
May 24, 2021, 11:20:17 AM5/24/21
to Harbour Users
FUNCTION MAIN()
xresult:= FExcell_Install(oExcell)
IF VALTYPE(xResult) = "L" .AND. !xResult
  MsgStop('Error: Excel no instalado.' )
  RETURN
ENDIF
*
oExcell:WorkBooks:Add()
oBook:= oExcell:Get( "ActiveWorkBook")
oSheet := oExcell:Get( "ActiveSheet" )
*
oExcell:DisplayAlerts:= .F.
oSheet:Cells(nFila,nCol):Font:Size:= nFontSize
oSheet:Cells(nFila,nCol):Font:Bold:= .T. 

  oSheet:Cells(nFila,nCol):Borders(07):LineStyle := 1  // Left
  oSheet:Cells(nFila,nCol):Borders(08):LineStyle := 1  // Top
  oSheet:Cells(nFila,nCol):Borders(09):LineStyle := 1  // Bottom
  oSheet:Cells(nFila,nCol):Borders(10):LineStyle := 1  // Right

oSheet:Cells(nFila,nCol):Value:= "MyValue"
oExcell:DisplayAlerts:= .T.

RETURN
*----------------------------------------------------------------------------------
*-----------------------------------------------------------------------------------

FUNCTION FExcell_Install()
Local bHandler := errorblock( { | x | break( x ) } )
Local lExiste:= .T.

 BEGIN SEQUENCE
   oExcell:= TOleAuto():New( 'Excel.Application' )
 RECOVER USING oError
   MsgStop( 'Error: Excel no instalado.' )
   lexiste:= .F.
 END SEQUENCE  
 ERRORBLOCK( bHandler )
  
RETURN(lExiste)
Reply all
Reply to author
Forward
0 new messages