Silvio.Falconi
Posts: 7170 Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 3 times
Post
by Silvio.Falconi » Fri Sep 17, 2021 7:42 am
Making this sample test I can show any datas, where is the error ?
Code: Select all | Expand
#include "FiveWin.ch" Function test( ) local cFileXls:="orario.xlsx" Local oRange,lOpened:=.f. oRange := GetExcelRange( cFileXls , , @lOpened) xbrowser oRangereturn nil
I check the file with Google Excel
and I see there datas as you can see here
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
nageswaragunupudi
Posts: 10729 Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 10 times
Contact:
Post
by nageswaragunupudi » Fri Sep 17, 2021 10:58 am
GetExcelRange() can not open xls file, if it is already opened by any application other than Microsoft Excel. Close Google Sheets and try. Also give full path.
Regards
G. N. Rao.
Hyderabad, India
Silvio.Falconi
Posts: 7170 Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 3 times
Post
by Silvio.Falconi » Fri Sep 17, 2021 2:22 pm
nageswaragunupudi wrote: GetExcelRange() can not open xls file, if it is already opened by any application other than Microsoft Excel. Close Google Sheets and try. Also give full path.
please I not open the xls file with another app
please do you see my test sample ?
the file orario.xlsx is on the root of exe
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Marc Venken
Posts: 1485 Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium
Post
by Marc Venken » Fri Sep 17, 2021 2:51 pm
Your sample is working here. Just a local file from myself in de exe folder. rest is the same
Marc Venken
Using: FWH 23.08 with Harbour
Marc Venken
Posts: 1485 Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium
Post
by Marc Venken » Fri Sep 17, 2021 2:54 pm
Silvio, keep in mind that the sample is not killing the object, so exel is still in the taskbar. See into it... Maybe that is a issue at your site..
Marc Venken
Using: FWH 23.08 with Harbour
Silvio.Falconi
Posts: 7170 Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 3 times
Post
by Silvio.Falconi » Fri Sep 17, 2021 7:48 pm
Marc Venken wrote: Silvio, keep in mind that the sample is not killing the object, so exel is still in the taskbar. See into it... Maybe that is a issue at your site..
Can I send you a small test ? my mail is silvio_dot_falconi_at_gmail_dot_com
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
nageswaragunupudi
Posts: 10729 Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 10 times
Contact:
Post
by nageswaragunupudi » Fri Sep 17, 2021 9:25 pm
1) Is Microsoft Excel installed on this computer? Check: if ExcelObj() == nil ? "Not installed" else ? "Installed" endif 2) Also check if file exists with ? File( cFileXls )
Regards
G. N. Rao.
Hyderabad, India
Silvio.Falconi
Posts: 7170 Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 3 times
Post
by Silvio.Falconi » Sat Sep 18, 2021 6:44 am
nageswaragunupudi wrote: 1) Is Microsoft Excel installed on this computer? Check: if ExcelObj() == nil ? "Not installed" else ? "Installed" endif 2) Also check if file exists with ? File( cFileXls )
Sorry Nages,
one question: maybe the problem is that there is no Excel on that computer?
No there is no Excel,
discovered the mystery ... .
and I was convinced that it could work even without excel Is there no remote possibility of extracting data from an excel spreadsheet without having Microsoft Excel installed?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
anserkk
Posts: 1333 Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India
Has thanked: 2 times
Post
by anserkk » Mon Sep 20, 2021 4:42 am
Silvio.Falconi wrote: Is there no remote possibility of extracting data from an excel spreadsheet without having Microsoft Excel installed?
You can use ADO to read the Excel data without having Excel installed on your PC
nageswaragunupudi
Posts: 10729 Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 10 times
Contact:
Post
by nageswaragunupudi » Mon Sep 20, 2021 5:16 am
Yes, Thanks Mr. Anser
FWH has function for reading Excel with ADO
Code: Select all | Expand
oRs := FW_OpenADOExcelSheet( cFile, [ cSheet] , [ cRange] , [ lHeaders] ) XBROWSER oRs
Regards
G. N. Rao.
Hyderabad, India
Silvio.Falconi
Posts: 7170 Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 3 times
Post
by Silvio.Falconi » Mon Sep 20, 2021 8:04 am
nageswaragunupudi wrote: Yes, Thanks Mr. Anser
FWH has function for reading Excel with ADO
Code: Select all | Expand
oRs := FW_OpenADOExcelSheet( cFile, [ cSheet] , [ cRange] , [ lHeaders] ) XBROWSER oRs
thanks Mr Nages,
I tried with
Code: Select all | Expand
oRange := FW_OpenADOExcelSheet( cFileXls) xbrowser oRange
Give me first this Message "ADO ERROR UKNOWN" and then "fail to open "C:\work\errori\getexelrange\orario.xls" I think I must install Microsoft.ACE.OLEDB from
https://www.microsoft.com/it-it/download/details.aspx?id=13255 another question I mustuse it on Tables with windows 10 Pro, I would have preferred not to install a lot of software to make the system more free Office would be a bit heavy
If I would install OpenOffice which is free, what function can I use?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com