Hi,
I have to import an excel file into a database an now I'm using the oSheet:Cells( nRow, nCol ):Value methode to read the first column to know
how many records the are, and read the fist row , how many colums to import.
Then I can use GetExcelRange()
Is there a faster way to know which row is the first empty cell, and which column is the first empty one?
Find out the range of a excel-sheet
-
- Posts: 1102
- Joined: Mon Oct 17, 2005 5:41 am
- Location: Belgium
- Contact:
Find out the range of a excel-sheet
Regards,
Marc
FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Marc
FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: Find out the range of a excel-sheet
oRange := GetExcelRange( cExcelFile )
Automatically returns the used range.
Automatically returns the used range.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
-
- Posts: 1102
- Joined: Mon Oct 17, 2005 5:41 am
- Location: Belgium
- Contact:
Re: Find out the range of a excel-sheet
Thank you,
With len( ArrTranspose( oRange:Value )) and now how many records there are, but how can I know the numbers of columns?
With len( ArrTranspose( oRange:Value )) and now how many records there are, but how can I know the numbers of columns?
Regards,
Marc
FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Marc
FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: Find out the range of a excel-sheet
? oRange:Rows:Count
? oRange:Columns:Count
? oRange:Columns:Count
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
-
- Posts: 1102
- Joined: Mon Oct 17, 2005 5:41 am
- Location: Belgium
- Contact:
Re: Find out the range of a excel-sheet
Thank you,
I just found that also works
But your suggestion is nicer
I just found that also
Code: Select all
len( ArrTranspose( oRange:Value )[1])
But your suggestion is nicer
Regards,
Marc
FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Marc
FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite