EXCEL export

EXCEL export

Postby Otto » Wed Mar 10, 2021 10:05 am

Dear Mr. Rao,
I want to test the EXCEL export from the preview.
I'm testing version 21-01 and yunos.prg.
I would now like to start the EXCEL export from the invoice preview.
However, the button cannot be activated.
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6253
Joined: Fri Oct 07, 2005 7:07 pm

Re: EXCEL export

Postby nageswaragunupudi » Wed Mar 10, 2021 11:44 am

If the preview is from printer object, there is no way FWH can figure out how to export to excel.
The programmer has to first write his own function to export the contents to export to Excel and then set
oPrn:bToExcel := { |oPreview| OutExportToExcelFunction( oPreview ) }

If oPrn:bToExcel exists, the excel button in preview buttonbar gets enabled.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10465
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: EXCEL export

Postby Otto » Wed Mar 10, 2021 12:53 pm

Dear Mr. Rao,
Thank you.
I can't find out, where inside
C:\fwh_2021\samples\testrpt4.prg
I find the code for EXCEL export.

Here the button is active, but the program errors out.

Do you have a sample for TReport class.

Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6253
Joined: Fri Oct 07, 2005 7:07 pm

Re: EXCEL export

Postby nageswaragunupudi » Wed Mar 10, 2021 1:39 pm

Please see my sample here.
viewtopic.php?f=3&t=40063
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10465
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: EXCEL export

Postby Otto » Wed Mar 10, 2021 5:39 pm

Dear Mr. Rao,
now I can select EXCEL but get an error with

GROUP ON renner->GRUPPE HEADER (renner->GRUPPE) FOOTER " " FONT 3
Time from start: 0 hours 0 mins 3 secs
Error occurred at: 10.03.2021, 18:32:34
Error description: Error Excel.Application:WORKBOOKS:ADD:ACTIVESHEET/3 DISP_E_MEMBERNOTFOUND: RANGE
Args:
[ 1] = O Excel.Application:WORKBOOKS:ADD:ACTIVESHEET:RANGE:CELLS
[ 2] = N 6

I have uploaded my source code:

https://mybergland.com/fwforum/samples.zip

Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6253
Joined: Fri Oct 07, 2005 7:07 pm

Re: EXCEL export

Postby nageswaragunupudi » Thu Mar 11, 2021 11:42 pm

Thanks for sharing your program which helped us to see the bug in TReport class.
Runtime error occurs when exporting to excel when the report has groups and first column has totals.
Fixed for the next version.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10465
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 54 guests