Page 1 of 1
GetExcelRange function
Posted: Tue Jul 10, 2018 11:02 am
by damianodec
hi,
I try to use GetExcelRange function and works with file excel on my pc but not work in lan.
this works:
Code: Select all | Expand
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: Select all | Expand
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?
Re: GetExcelRange function
Posted: Tue Jul 10, 2018 11:23 am
by Enrico Maria Giordano
Re: GetExcelRange function
Posted: Tue Jul 10, 2018 12:20 pm
by damianodec
hi Enrico,
Code: Select all | Expand
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:

Re: GetExcelRange function
Posted: Tue Jul 10, 2018 12:26 pm
by Enrico Maria Giordano
Please try with the FILE() function:
EMG
Re: GetExcelRange function
Posted: Tue Jul 10, 2018 12:33 pm
by damianodec
hi Enrico, this is:

Re: GetExcelRange function
Posted: Tue Jul 10, 2018 12:50 pm
by Enrico Maria Giordano
It's fine. Then check lOpened value:
EMG
Re: GetExcelRange function
Posted: Tue Jul 10, 2018 1:00 pm
by damianodec
.F. is the value
Re: GetExcelRange function
Posted: Tue Jul 10, 2018 1:13 pm
by Enrico Maria Giordano
So you have to ask Rao, sorry. I've never used those functions.
EMG
Re: GetExcelRange function
Posted: Tue Jul 10, 2018 1:15 pm
by damianodec
ok, thank you, I'm waiting Mr. Rao
Re: GetExcelRange function
Posted: Tue Jul 10, 2018 1:38 pm
by damianodec
in Forum I found this thread:
http://forums.fivetechsupport.com/viewtopic.php?f=3&t=30117&p=172039&hilit=getexcelrange#p172025and I try this:
Code: Select all | Expand
oExcel := ExcelObj()
oBook := oExcel:WorkBooks:Open( cPath+aFile[nZ] )
oRange := GetExcelRange(cPath+alltrim(aFile[nZ]), , , @lOpened )
and now works...
Re: GetExcelRange function
Posted: Tue Jul 10, 2018 1:48 pm
by Enrico Maria Giordano
Great!
EMG
Re: GetExcelRange function
Posted: Sat Jul 14, 2018 1:03 am
by nageswaragunupudi
Fixed in FWH 18.05