FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour GetExcelRange function
Posts: 434
Joined: Wed Jun 06, 2007 02:58 PM

GetExcelRange function

Posted: Tue Jul 10, 2018 11:02 AM
hi,
I try to use GetExcelRange function and works with file excel on my pc but not work in lan.

this works:
Code (fw): Select all Collapse
cPath = "c:\myfolder\"
cFile = "myfile.xls"
GetExcelRange(cPath+cFile, , , @lOpened )


I have a folder in another pc in my lan and that folder has linked on my pc with S: unit, if I try this:
Code (fw): Select all Collapse
cPath = "S:\"
cFile = "myfile.xls"
GetExcelRange(cPath+cFile, , , @lOpened )

that not works.
I have full access to folder linked to S: unit (read and write)

any help?
FiveWin for xHarbour 24.02 - Feb. 2024 - Embarcadero C++ 7.60 for Win32 Copyright (c) 1993-2023

FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)

Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM

Re: GetExcelRange function

Posted: Tue Jul 10, 2018 11:23 AM
Try this:

Code (fw): Select all Collapse
? FILE( cPath+cFile )


EMG
Posts: 434
Joined: Wed Jun 06, 2007 02:58 PM

Re: GetExcelRange function

Posted: Tue Jul 10, 2018 12:20 PM
hi Enrico,

Code (fw): Select all Collapse
msginfo(cPath+alltrim(aFile[nZ]))
oRange  := GetExcelRange(cPath+alltrim(aFile[nZ]), , , @lOpened )


this is msginfo:
S:\PREVENTIVI\ANNO_2018\dado_08 04 2018.xls

and this is GetExcelRange:
FiveWin for xHarbour 24.02 - Feb. 2024 - Embarcadero C++ 7.60 for Win32 Copyright (c) 1993-2023

FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)

Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM

Re: GetExcelRange function

Posted: Tue Jul 10, 2018 12:26 PM
Please try with the FILE() function:

Code (fw): Select all Collapse
? FILE( cPath+alltrim(aFile[nZ]) )


EMG
Posts: 434
Joined: Wed Jun 06, 2007 02:58 PM

Re: GetExcelRange function

Posted: Tue Jul 10, 2018 12:33 PM
hi Enrico, this is:
FiveWin for xHarbour 24.02 - Feb. 2024 - Embarcadero C++ 7.60 for Win32 Copyright (c) 1993-2023

FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)

Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM

Re: GetExcelRange function

Posted: Tue Jul 10, 2018 12:50 PM
It's fine. Then check lOpened value:

Code (fw): Select all Collapse
? lOpened


EMG
Posts: 434
Joined: Wed Jun 06, 2007 02:58 PM

Re: GetExcelRange function

Posted: Tue Jul 10, 2018 01:00 PM
.F. is the value
FiveWin for xHarbour 24.02 - Feb. 2024 - Embarcadero C++ 7.60 for Win32 Copyright (c) 1993-2023

FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)

Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM

Re: GetExcelRange function

Posted: Tue Jul 10, 2018 01:13 PM

So you have to ask Rao, sorry. I've never used those functions.

EMG

Posts: 434
Joined: Wed Jun 06, 2007 02:58 PM

Re: GetExcelRange function

Posted: Tue Jul 10, 2018 01:15 PM

ok, thank you, I'm waiting Mr. Rao

FiveWin for xHarbour 24.02 - Feb. 2024 - Embarcadero C++ 7.60 for Win32 Copyright (c) 1993-2023

FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)

Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
Posts: 434
Joined: Wed Jun 06, 2007 02:58 PM

Re: GetExcelRange function

Posted: Tue Jul 10, 2018 01:38 PM
in Forum I found this thread:
http://forums.fivetechsupport.com/viewtopic.php?f=3&t=30117&p=172039&hilit=getexcelrange#p172025

and I try this:
Code (fw): Select all Collapse
        oExcel   := ExcelObj()
        oBook    := oExcel:WorkBooks:Open( cPath+aFile[nZ] )        
        oRange  := GetExcelRange(cPath+alltrim(aFile[nZ]), , , @lOpened )


and now works...
FiveWin for xHarbour 24.02 - Feb. 2024 - Embarcadero C++ 7.60 for Win32 Copyright (c) 1993-2023

FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)

Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM

Re: GetExcelRange function

Posted: Sat Jul 14, 2018 01:03 AM

Fixed in FWH 18.05

Regards



G. N. Rao.

Hyderabad, India

Continue the discussion