Create Excel Workbooks in Mod_Harbour

mod_harbour is an Apache module that allows to run PRGs directly on the web !!!

Create Excel Workbooks in Mod_Harbour

Postby byron.hopp » Mon Jul 12, 2021 9:34 pm

Is it possible to access Excel via OLE on Mod_Harbour running on IIS. Any example programs?

Thanks,

Byron ...
Thanks,
Byron Hopp
Matrix Computer Services
byron.hopp
 
Posts: 382
Joined: Sun Nov 06, 2005 3:55 pm
Location: Southern California, USA

Re: Create Excel Workbooks in Mod_Harbour

Postby Antonio Linares » Tue Jul 13, 2021 6:33 am

Byron,

This works fine with IIS + mod_harbour

Code: Select all  Expand view
function Main()

   local oExcel := win_OleCreateObject( "Excel.Application" )

   ? oExcel:ClassName()

return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42098
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Create Excel Workbooks in Mod_Harbour

Postby byron.hopp » Tue Jul 13, 2021 6:51 am

Sweet.

Thank you,
Thanks,
Byron Hopp
Matrix Computer Services
byron.hopp
 
Posts: 382
Joined: Sun Nov 06, 2005 3:55 pm
Location: Southern California, USA

Re: Create Excel Workbooks in Mod_Harbour

Postby Massimo Linossi » Tue Jul 13, 2021 7:29 pm

Hello Antonio,
can this command work with FastCgi too ?
And what are the methods and classes that can be called ?
Thanks a lot
User avatar
Massimo Linossi
 
Posts: 498
Joined: Mon Oct 17, 2005 10:38 am
Location: Italy

Re: Create Excel Workbooks in Mod_Harbour

Postby byron.hopp » Tue Jul 13, 2021 7:38 pm

All,

What is, or is there a difference between:

Win_OleCreateObject

and

CreateObject

functions...

Byron,
Thanks,
Byron Hopp
Matrix Computer Services
byron.hopp
 
Posts: 382
Joined: Sun Nov 06, 2005 3:55 pm
Location: Southern California, USA

Re: Create Excel Workbooks in Mod_Harbour

Postby Antonio Linares » Wed Jul 14, 2021 2:13 pm

Dear Massimo,

Massimo Linossi wrote:Hello Antonio,
can this command work with FastCgi too ?
And what are the methods and classes that can be called ?
Thanks a lot


Yes, it should, as that function is provided from Harbour's hbwin.lib and it is linked inside mod_harbour

DATAs and Methods of OLE objects are different for each used OLE object (that belongs to a different OLE class)

In these forums you find many examples for using Excel
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42098
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Create Excel Workbooks in Mod_Harbour

Postby Antonio Linares » Wed Jul 14, 2021 2:15 pm

Dear Byron,

byron.hopp wrote:All,

What is, or is there a difference between:

Win_OleCreateObject

and

CreateObject

functions...

Byron,


Win_OleCreateObject is provided by Harbour's contrib hbwin.lib

CreateObject() is provided by FWH
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42098
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Create Excel Workbooks in Mod_Harbour

Postby Massimo Linossi » Wed Jul 14, 2021 5:08 pm

Hi Antonio,

Code: Select all  Expand view

Sheet1 Error: Argument error
operation: SAVE
[ 1] = C c:/temp/Export_Excel.xlsx
[ 2] = N 51
called from: WIN_OLEAUTO:SAVE, line: 0
called from: pcode.hrb, MAIN, line: 64
called from: HB_HRBDO, line: 0
called from: ..\source\exec.prg, EXECUTE, line: 70

Source:
0062:
0063:
0064 =>oWorkBook:Save(nomefile, 51)
0065: oWorkBook:Close(.T.)
0066: oExcel:Quit()
 


What is the correct sintax for saving a file in Excel ?
User avatar
Massimo Linossi
 
Posts: 498
Joined: Mon Oct 17, 2005 10:38 am
Location: Italy

Re: Create Excel Workbooks in Mod_Harbour

Postby Antonio Linares » Thu Jul 15, 2021 10:18 am

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42098
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to mod_harbour

Who is online

Users browsing this forum: No registered users and 16 guests