GetExcelRange wrong return

Post Reply
User avatar
dutch
Posts: 1395
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

GetExcelRange wrong return

Post by dutch »

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
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: GetExcelRange wrong return

Post by nageswaragunupudi »

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
dutch
Posts: 1395
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Re: GetExcelRange wrong return

Post by dutch »

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
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: GetExcelRange wrong return

Post by nageswaragunupudi »

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
dutch
Posts: 1395
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Re: GetExcelRange wrong return

Post by dutch »

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)
Post Reply