Page 1 of 1 1
Topic Options
#101064 - 2003-05-16 02:24 PM Feedback - ReadExcel2() - Reads from...
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Jooel,

Rather than cluttering up the UDF Section with my feedback. [Smile]

ReadExcel2() - Reads from...

quote:

; ROWCOUNT
; REQUIRED
; Amount of Rows to read

Why is this required? Why not make this terminate upon encountering a NULL value?

Thanks,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#101065 - 2003-05-16 02:26 PM Re: Feedback - ReadExcel2() - Reads from...
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
null?
can excel return nul?
_________________________
!

download KiXnet

Top
#101066 - 2003-05-16 02:29 PM Re: Feedback - ReadExcel2() - Reads from...
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Null, Blank, whatever..

In the process when looping through them, when a blank is read by the variable, is there any sense in continuing?

The basis of my question is that say I have 10 spreadsheets that I need to read in.. They all have varying amounts of records, why should I have to input in the rowcount for each one?

Kent

[ 16. May 2003, 14:30: Message edited by: kdyer ]
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#101067 - 2003-05-16 02:30 PM Re: Feedback - ReadExcel2() - Reads from...
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
k, checked.
it indeed can return nul value but it returns such value if string length is 0.
that is not what it should be.

I'm reading tables with this, which have empty lines between data and 1 field is not required.

so, can't trust with that.

tried actually with rows collection but all that got was huge memory usage (over 200M) before killed the script [Wink]
_________________________
!

download KiXnet

Top
#101068 - 2003-05-16 02:36 PM Re: Feedback - ReadExcel2() - Reads from...
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Understand your argument..

Let me shed a little background here. We get submissions from our Secondary Marketing and Shipping teams. One of the spreadsheets we get is for "Loan Sales" and the other is "Loan Sales Data." The first column (which is what we check) is always a Loan Number and when it comes across a blank record the process stops. As user of this process, why should I care how many rows are input? The only thing that I care, as a Developer of this is that the data is in proper column and is complete.

This code originated from a Access Database that I developed some VBA Code and a vendor provided COM Object to update our Loan Origination System.

Thanks,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#101069 - 2003-05-16 02:48 PM Re: Feedback - ReadExcel2() - Reads from...
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
You could always make RowCount/ColumnCount optional and stop on the first empty cell by default.
_________________________
There are two types of vessels, submarines and targets.

Top
#101070 - 2003-05-16 02:50 PM Re: Feedback - ReadExcel2() - Reads from...
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Whew! I should have just stated that instead of the diatribe I posted. [Razz]

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#101071 - 2003-05-16 03:00 PM Re: Feedback - ReadExcel2() - Reads from...
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
well...
I can always return the whole workbook...
or make a selection by sheet index...

but that is slower...
will see what I will come up with.
_________________________
!

download KiXnet

Top
#101072 - 2003-05-16 03:39 PM Re: Feedback - ReadExcel2() - Reads from...
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
what about the col-number then?
if that is required can reduce the load time a lot...
_________________________
!

download KiXnet

Top
#101073 - 2003-05-16 04:10 PM Re: Feedback - ReadExcel2() - Reads from...
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
k, got a new one for you to test.
this could be improved though but anyway...

will need to re-write the headers (version number changed [Big Grin] )
_________________________
!

download KiXnet

Top
Page 1 of 1 1


Moderator:  Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 675 anonymous users online.
Newest Members
batdk82, StuTheCoder, M_Moore, BeeEm, min_seow
17885 Registered Users

Generated in 0.133 seconds in which 0.099 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org