GetExcelRange wrong return

GetExcelRange wrong return

Postby dutch » Wed Aug 19, 2020 9:25 pm

I have define columns types as text in 156 rows and 6 columns.
I use GetExcelRange( cExcelFile) but return many 156 rows and 6 columns with empty rows and columns as picture.

? oRange:Rows:Count // return 156
? oRange:Columns:Count // return 6

Image

Thanks in advance for any help and advise.
Regards,
Dutch

FWH 19.01 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)
User avatar
dutch
 
Posts: 1535
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Re: GetExcelRange wrong return

Postby nageswaragunupudi » Thu Aug 20, 2020 4:39 am

I see 6 rows only in both xbrowse and excel sheet.
Can you explain your problem more clearly?
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10465
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: GetExcelRange wrong return

Postby dutch » Fri Aug 21, 2020 1:17 am

Dear Master Rao,
nageswaragunupudi wrote:I see 6 rows only in both xbrowse and excel sheet.
Can you explain your problem more clearly?


It reads 156 rows ( 6 datas and 150 empty ) and 1 empty column.

FYI, I select 156 rows/ 6 columns and define as Text in Format cells. The function will select all even empty rows and columns.

Thanks in advance.
Regards,
Dutch

FWH 19.01 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)
User avatar
dutch
 
Posts: 1535
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Re: GetExcelRange wrong return

Postby nageswaragunupudi » Fri Aug 21, 2020 6:10 am

By default, it will select
oSheet:UsedRange.

And UsedRange includes any cells the user has used even for formatting even if does not have any data.

If you want to read only specific range, then you can specify the range explicitly in the function in the 3rd parameter
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10465
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: GetExcelRange wrong return

Postby dutch » Fri Aug 21, 2020 7:15 am

Thank you so much, I got it.
Dutch
Regards,
Dutch

FWH 19.01 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)
User avatar
dutch
 
Posts: 1535
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 47 guests