Theotokos Posted November 30, 2022 Report Share Posted November 30, 2022 POrque o BOTAO EXCEL fica inativo ? como habilitar para poder exporta para Excel? Quote Link to comment Share on other sites More sharing options...
kapiaba Posted November 30, 2022 Report Share Posted November 30, 2022 Veja se ajuda: http://forums.fivetechsupport.com/viewtopic.php?f=6&t=42293&sid=c27ae7be2120ecdedf325bb8ccca08b3 Regards, saludos. Quote Link to comment Share on other sites More sharing options...
kapiaba Posted November 30, 2022 Report Share Posted November 30, 2022 Exemplo simples: Eu acho... kkkkkkkkk #include "fivewin.ch" #include "report.ch" function Main() local oRep, oFont, oBold, oCol USE STATES NEW SHARED GO TOP DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-12 REPORT oRep PREVIEW FONT oFont COLUMN oCol TITLE "CODE" DATA FIELD->CODE COLUMN oCol TITLE "NAME" DATA FIELD->NAME ENDREPORT oRep:bInit := { || STATES->( DBGOTOP() ) } ACTIVATE REPORT oRep RELEASE FONT oFont STATES->( DBCLOSEAREA() ) // or simpler CLOSE STATES return nil Regards, saludos. Quote Link to comment Share on other sites More sharing options...
Theotokos Posted November 30, 2022 Author Report Share Posted November 30, 2022 entao com report funciona, não funciona com PRINT oPrn Quote Link to comment Share on other sites More sharing options...
kapiaba Posted November 30, 2022 Report Share Posted November 30, 2022 Então, veja na RPREVIEW.PRG: WHEN ::CanExportToExcel É por ai... http://forums.fivetechsupport.com/viewtopic.php?f=6&t=38541&p=229960&hilit=CanExportToExcel&sid=a3cff7996c523d3d3a5117ffcc86359a#p229960 Regards, saludos. Quote Link to comment Share on other sites More sharing options...
kapiaba Posted December 8, 2022 Report Share Posted December 8, 2022 Precisei agora, e realmente essa bagaça não funciona. Criei um tópico no inter aqui: http://forums.fivetechsupport.com/viewtopic.php?f=6&t=42578&sid=103749f3da5feb59419686288a1a5dc7 Regards, saludos. Theotokos 1 Quote Link to comment Share on other sites More sharing options...
kapiaba Posted December 9, 2022 Report Share Posted December 9, 2022 o Master nages Respondeu como fazer. http://forums.fivetechsupport.com/viewtopic.php?f=6&t=42578&sid=6392a89c1246f14ea6c3461cb6f1566e Regards, saludos. Quote Link to comment Share on other sites More sharing options...
kapiaba Posted December 9, 2022 Report Share Posted December 9, 2022 Pronto! Exemplo by Mister Nages: // C:\FWH..\SAMPLES\EXCELPRV.PRG - EXCEL NO PREVIEW. #Include "FiveWin.ch" FUNCTION Main() LOCAL oPrn, oFont, nRow, nCol USE STATES NEW SHARED STATES->( StatesReport() ) CLOSE STATES RETURN NIL STATIC FUNCTION StatesReport() LOCAL oPrn, oFont, nRow GO TOP PRINT oPrn PREVIEW // AQUI LIGA O EXCEL. oPrn:bToExcel := {|| ( Alias() )->( StatesToExcel() ) } DEFINE FONT oFont NAME "TAHOMA" SIZE 0, - 10 OF oPrn PAGE nRow := 1 WHILE .NOT. Eof() SYSREFRESH() @ nRow, 5.0 PRINT TO oPrn TEXT FIELD->CODE SIZE 1, 0.4 CM FONT oFont @ nRow, 6.0 PRINT TO oPrn TEXT FIELD->NAME SIZE 10, 0.4 CM FONT oFont nRow += 0.5 SKIP ENDDO ENDPAGE ENDPRINT RELEASE FONT oFont GO TOP RETURN NIL STATIC FUNCTION StatesToExcel() LOCAL oExcel, oBook, oSheet, nRow oExcel := ExcelObj() oExcel:ScreenUpdating := .F. oBook := oExcel:WorkBooks:Add() oSheet := oExcel:ActiveSheet GO TOP nRow := 1 WHILE .NOT. Eof() SYSREFRESH() oSheet:Cells( nRow, 1 ):Value := FIELD->CODE oSheet:Cells( nRow, 2 ):Value := FIELD->NAME nRow++ SKIP ENDDO GO TOP oSheet:Columns( 1 ):AutoFit() oSheet:Columns( 2 ):AutoFit() oExcel:ScreenUpdating := .T. oExcel:Visible := .T. RETURN NIL // FIN / END Regards, saludos. Quote Link to comment Share on other sites More sharing options...
kapiaba Posted December 9, 2022 Report Share Posted December 9, 2022 Em tempo: este comando para ligar o EXCEL no PREVIEW, é a partir da versão FWH13.07 ou FWH17.11, ok? Veja também , esse BUG na REPORT.PRG, veja se já corrigiram na sua versão: http://forums.fivetechsupport.com/viewtopic.php?f=3&t=40087&p=239200&hilit=bToExcel&sid=6392a89c1246f14ea6c3461cb6f1566e#p239200 Origem: http://forums.fivetechsupport.com/viewtopic.php?f=3&t=39065&p=233006&hilit=bToExcel&sid=6392a89c1246f14ea6c3461cb6f1566e#p233006 Regards, saludos. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.