FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Problem with GetExcelRange()
Posts: 842
Joined: Mon Oct 10, 2005 01:29 PM
Problem with GetExcelRange()
Posted: Thu Feb 05, 2015 10:23 AM

Hello ,

I have a strange problem with GetExcelRange( cFile)

This works GetExcelRange( "C:\test\test.xlsx)

If cFile is in another PC in net doesn't work GetExcelRange( "\pc\test\test.xlsx)

Regards
Maurizio

www.nipeservice.com

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Problem with GetExcelRange()
Posted: Thu Feb 05, 2015 01:50 PM
Can you please try this code first?

Code (fw): Select all Collapse
oExcel   := ExcelObj()
oBook    := oExcel:WorkBooks:Open( "\\pc\test\test.xlsx" )
? oBook:FullName

If this code works without errors, then GetExcelRange() should work.
If you get errors please let us know.
Regards



G. N. Rao.

Hyderabad, India
Posts: 842
Joined: Mon Oct 10, 2005 01:29 PM
Re: Problem with GetExcelRange()
Posted: Thu Feb 05, 2015 03:24 PM

Thank Rao,

This does'n work
cFile := "\pc\test\test.xlsx"
oRange := GetExcelRange( cFile )
The Excel Message is : the file was not found. It may have been moved, renamed or deleted .

This works

cFile := "\pc\test\test.xlsx"
oExcel := ExcelObj()
oBook := oExcel:WorkBooks:Open( cFile )
? oBook:FullName
TRY
oSheet := oBook:ActiveSheet
oRange := oSheet:UsedRange
CATCH
END

Regards Maurizio

www.nipeservice.com

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Problem with GetExcelRange()
Posted: Thu Feb 05, 2015 04:14 PM

Thanks for the feedback.
That means we need to recheck our function.
We shall do that and I may request you help to check it, when I come back to you.

Regards



G. N. Rao.

Hyderabad, India

Continue the discussion