FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Xlsxlibhb_ver2
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Xlsxlibhb_ver2
Posted: Sat Nov 04, 2023 01:09 PM
Creae the class using:
Code (fw): Select all Collapse
oXlsx := XlsxObj( cFileXlsx, cSheetName )
For the first tests:
Code (fw): Select all Collapse
WITH OBJECT oXlsx
:Say( 0,0,"NEW" )
:Say( 1,1, 200 )
:Say( 2,1, 500 )
:Say( 3,1,"=SUM(A2:A3)" )

:Close()
END

ShellExecute( 0, "Open", oXlsx:cFile )
Also see fwh\samples\xlsx01.prg

We will soon provide more information
Regards



G. N. Rao.

Hyderabad, India
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Xlsxlibhb_ver2
Posted: Sat Nov 04, 2023 01:18 PM
METHODS
Code (fw): Select all Collapse
METHOD AddSheet( cNewSheetName )
METHOD Address( nRow, nCol, nRow2, nCol2 ) // Adddress( 1,1 ) -> "B2"
METHOD RowHeight( nRow, nHeight, oFormat, lPixel ) 
METHOD SetColumnSize( nColFrom, nColTo, nWidth, oFormat, lPixel ) 
METHOD MergeRange( r1, c1, r2, c2, cValue, oFormat ) 
METHOD SayImage( nRow, nCol, cImage ) 
METHOD SayFormula( nRow, nCol, cFormula, oFormat, cPicture ) 
METHOD Say( nRow, nCol, uValue, oFormat, cPicture )\
Β  Β  Β  Β // Say() calls SayImage() or SayFormula 
METHOD SetBrush( cImage ) 


//These methods are for Tables only
METHOD SayRow( nRow, aValues, aFormat ) 
METHOD SetStruct( aStruct, nRow, aGroup ) 
METHOD SetFooter( aFooter, nRow ) 
METHOD SetArrayData( aData, aStruct, aGroup ) 
METHOD CreateFrom( uSrc ) 
//

METHOD Close()
CreateFrom()
Code (fw): Select all Collapse
oXlsx := XlsxObj( cFile, cSheet )
( cAlias )->( oXlsx:CreateFrom() ) // Creates xlsx sheet from the dbf
oXlsx:Close()
Code (fw): Select all Collapse
oXlsx := XlsxObj( cFile, cSheet )
oXlsx:CreateFrom( oAdoRecordSet ) // Creates xlsx sheet from recordset
oXlsx:Close()
We will provide more information in due course
Regards



G. N. Rao.

Hyderabad, India
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Xlsxlibhb_ver2
Posted: Sat Nov 04, 2023 01:25 PM
If you set
Code (fw): Select all Collapse
UseXLSXLIB( Β .T. Β )
All toExcel methods will use this lib instead of Using Excel
Regards



G. N. Rao.

Hyderabad, India
Posts: 1387
Joined: Fri May 23, 2008 01:33 PM
Re: Xlsxlibhb_ver2
Posted: Sat Nov 04, 2023 02:20 PM

Thank you Mr. Rao,

It is ok now.

Regards,



Hakan ONEMLI



Harbour & MSVC 2022 & FWH 23.06
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Xlsxlibhb_ver2
Posted: Sat Nov 04, 2023 02:25 PM
You can also use:
Code (fw): Select all Collapse
oXlsx:B3 := 200.00
Regards



G. N. Rao.

Hyderabad, India
Posts: 1816
Joined: Wed Oct 26, 2005 02:49 PM
Re: Xlsxlibhb_ver2
Posted: Mon Nov 20, 2023 11:10 PM
Hola buenas noches para todos

Descargue la clase e intente hacer la prueba de uso, pero al compilar sale el mismo error que con la clase de Maestro Charles Kwon, creo que tiene que ver con el tema de actualizaciΓ³n del Borland 770 o el xharbour para Bcc770.

De antemano gracias

https://forums.fivetechsupport.com/viewtopic.php?f=3&t=43643&start=15&sid=e95415d83d3e49a1b93ef27e115d5e5a#p265458
Code (fw): Select all Collapse
xHarbour 1.3.0 Intl. (SimpLex) (Build 20231104)
Copyright 1999-2023, http://www.xharbour.org http://www.harbour-project.org/
Compiling 'z:\prg\R32_menu.prg'...

100

200

100

100

100

100

100

200

300

400

500

600

700

800

900

1000

1100

100

200

100

200

300

100

200

100

200

300

400

500

600

700

800

900

1000

1100

1200

1300

1400

1500

1600

1700

1800

1900

2000

2100

2200

100

200

300

400

500

100

200

100

200

300

400

500

600

700

800

900

1000

1100

1200

1300

1400

1500

1600

1700

1800

1900

2000

2100

2200

2300

2400

2500

2600

2700

2800

2900

3000

3100
Generating C source output to 'C:\Fivedit\R32_menu.c'...
Done.

Lines 3066, Functions/Procedures 38, pCodes 13839
Embarcadero C++ 7.70 for Win32 Copyright (c) 1993-2023 Embarcadero Technologies, Inc.
C:\Fivedit\R32_menu.c:
xHarbour 1.3.0 Intl. (SimpLex) (Build 20231104)
Copyright 1999-2023, http://www.xharbour.org http://www.harbour-project.org/
Compiling 'z:\prg\R32_perm.prg'...

100

200

100

100

100

100

100

200

300

400

500

600

700

800

900

1000

1100

100

200

100

200

300

100

2/
Turbo Incremental Link 6.97 Copyright (c) 1997-2022 Embarcadero Technologies, Inc.
Error: Unresolved external '__streams' referenced from C:\DLYMA\XLSXLIB\LIB\XLSXLIBHB.LIB|drawing
Error: Unresolved external '_hb_parvptr' referenced from C:\DLYMA\XLSXLIB\LIB\XLSXLIBHB.LIB|XlxsFunc
Error: Unable to perform link
Link Error
Saludos
LEANDRO AREVALO
BogotΓ‘ (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com

[ Turbo Incremental Link64 6.98 Embarcadero 7.70 ] [ FiveWin 25.01 ] [ xHarbour 64 bits) ]
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Xlsxlibhb_ver2
Posted: Tue Nov 21, 2023 04:03 AM

Do you have FWH2310?

Regards



G. N. Rao.

Hyderabad, India
Posts: 1816
Joined: Wed Oct 26, 2005 02:49 PM
Re: Xlsxlibhb_ver2
Posted: Tue Nov 21, 2023 09:17 AM

Si, tenemos fwh2310

Saludos
LEANDRO AREVALO
BogotΓ‘ (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com

[ Turbo Incremental Link64 6.98 Embarcadero 7.70 ] [ FiveWin 25.01 ] [ xHarbour 64 bits) ]
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Xlsxlibhb_ver2
Posted: Tue Nov 21, 2023 10:25 AM
Then,
first go to fwh\samples folder
open buildx.bat with notebook
Locate the two lines:
Code (fw): Select all Collapse
rem echo %fwh%\lib\drxlsx32x_bcc.lib + >> b32.bc
rem echo %fwh%\lib\xlsxlibhbbccx.lib + >> b32.bc
Delete "rem " from the second line like this:
Code (fw): Select all Collapse
rem echo %fwh%\lib\drxlsx32x_bcc.lib + >> b32.bc
echo %fwh%\lib\xlsxlibhbbccx.lib + >> b32.bc
Then, build and run
Code (fw): Select all Collapse
buildx xlsx01
When you see xbrowse of customer.dbf, if you click on the "Excel" button,
- your will be prompted to select an xlsx file name to save and then
- saves the file immediately using the xlsxlib.

You will also see two more tests with images, fonts, etc.
Regards



G. N. Rao.

Hyderabad, India
Posts: 1816
Joined: Wed Oct 26, 2005 02:49 PM
Re: Xlsxlibhb_ver2
Posted: Tue Nov 21, 2023 10:56 AM
Mr.Rao hice lo que mencionaste, pero nos sale error
Code (fw): Select all Collapse
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
?FiveWin for xHarbour 23.10 - Oct. 2023 Β  Β  Β  Β  Β Harbour development power Β β”‚β–„
?(c) FiveTech 1993-2023 for Microsoft Windows 9X/NT/200X/ME/XP/Vista/7/8/10 β”‚β–ˆ
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜?
Β  β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€β–€?
Compiling...
xHarbour 1.3.0 Intl. (SimpLex) (Build 20231104)
Copyright 1999-2023, http://www.xharbour.org http://www.harbour-project.org/
Compiling 'xlsx01.prg' and generating preprocessed output to 'xlsx01.ppo'...
Generating C source output to 'xlsx01.c'...
Done.
Lines 121, Functions/Procedures 4, pCodes 387
Embarcadero C++ 7.70 for Win32 Copyright (c) 1993-2023 Embarcadero Technologies, Inc.
xlsx01.c:
Turbo Incremental Link 6.97 Copyright (c) 1997-2022 Embarcadero Technologies, Inc.
Error: Unresolved external '__streams' referenced from C:\FWH2310\LIB\XLSXLIBHBBCCX.LIB|drawing
Error: Unable to perform link
* Linking errors *

C:\fwh2310\samples>
Saludos
LEANDRO AREVALO
BogotΓ‘ (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com

[ Turbo Incremental Link64 6.98 Embarcadero 7.70 ] [ FiveWin 25.01 ] [ xHarbour 64 bits) ]
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Xlsxlibhb_ver2
Posted: Tue Nov 21, 2023 11:16 AM
leandro wrote:
Code (fw): Select all Collapse
Error: Unresolved external '__streams' referenced from C:\FWH2310\LIB\XLSXLIBHBBCCX.LIB|drawing
The symbol "_streams" is used inside the lib XLSXLIBHBBCCX.LIB. It is impossible to fix it without the source code. As a stupid test, try to define a dummy "_streams" symbol (note: with only one underscore). Something like this:
Code (fw): Select all Collapse
FUNCTION _STREAMS(); RETURN NIL
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Xlsxlibhb_ver2
Posted: Tue Nov 21, 2023 11:20 AM

I have used our old xharbour and everything is working perfectly.

I will try with new version also.

Regards



G. N. Rao.

Hyderabad, India
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Xlsxlibhb_ver2
Posted: Tue Nov 21, 2023 11:25 AM
Errors with new version:
Code (fw): Select all Collapse
Turbo Incremental Link 6.70 Copyright (c) 1997-2014 Embarcadero Technologies, Inc.
Error: Unresolved external '___get_std_stream' referenced from C:\XHARBOUR\LIB\COMMON.LIB|hbtrace
Error: Unresolved external '__chdir' referenced from C:\XHARBOUR\LIB\HBZIP.LIB|zipplatform
Error: Unable to perform link
* Linking errors *
It is ok.
The authors made the full source code available.
FWH will try to build a new lib with new xHarbour.

Till then we can continue the work with older xHarbour
Regards



G. N. Rao.

Hyderabad, India
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Xlsxlibhb_ver2
Posted: Tue Nov 21, 2023 11:30 AM

Can I see the source code you are trying to compile, please? I'm using the new build without any problem.

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Xlsxlibhb_ver2
Posted: Tue Nov 21, 2023 11:40 AM
The problem is not only with the xlsx library.
Having problems with all progams with this new xharbour build,

trying to build the most simple program in the samples folder
samples\tutor01.prg
Code (fw): Select all Collapse
Compiling...
xHarbour 1.3.0 Intl. (SimpLex) (Build 20231104)
Copyright 1999-2023, http://www.xharbour.org http://www.harbour-project.org/
Compiling 'tutor01.prg' and generating preprocessed output to 'tutor01.ppo'...
Generating C source output to 'tutor01.c'...
Done.
Lines 13, Functions/Procedures 1, pCodes 16
Embarcadero C++ 7.00 for Win32 Copyright (c) 1993-2015 Embarcadero Technologies, Inc.
tutor01.c:
Borland Resource Compiler Β Version 5.40
Copyright (c) 1990, 1999 Inprise Corporation. Β All rights reserved.
Turbo Incremental Link 6.70 Copyright (c) 1997-2014 Embarcadero Technologies, Inc.
Error: Unresolved external '___get_std_stream' referenced from C:\XHARBOUR\LIB\COMMON.LIB|hbtrace
Error: Unresolved external '__chdir' referenced from C:\XHARBOUR\LIB\HBZIP.LIB|zipplatform
Error: Unable to perform link
* Linking errors *
So for now, it is safe to use older vesion of xHarbour till these problems are fixed.

Keep aside the issue of drxlsx or xlsxlib. We can handle them later.

First thing we should be able to build our own programs and run.
Better we revert to older xharbour for the time being till our Experts resolve these issues.
Regards



G. N. Rao.

Hyderabad, India