If you have Excel loaded on the workstation you could always add it as a
reference and do this:

 

Dim oExcel as New Excel.Application

Dim Osheet as WorkSheet

Dim intRowCount as Integer

 

oExcel.Workbooks.Open "C:\SomeFile.xls"

Set oSheet = oExcel.ActiveSheet

intRowCount = oSheet.UsedRange.Rows.Count

 

this should give you the actual 'used rows' from your excel sheet.

 

Tim

 

 

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Heather Castillo
Sent: Friday, February 15, 2008 7:50 AM
To: [email protected]
Subject: [Talk] Row Count

 

Anyone happen to know a simple object/function to count the number of
rows in an excel spreadsheet from the datastation and return that as a
variable? I think I am making this way more difficult than it needs to
be....

Thanks!


---------------------------------------
Heather Castillo
Module Coordinator/HPMIN Support
Information Systems
785.623.5084
HaysMedicalCenter
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 
 



CONFIDENTIALITY NOTICE: This message and any included attachments are from 
Salinas Valley Memorial Healthcare System and are intended only for the 
addressee.  The information contained in this message is confidential and may 
constitute inside or non-public information under international, federal, or 
state securities laws.  Unauthorized forwarding, printing, copying, 
distribution, or use of such information is strictly prohibited and may be 
unlawful.  If you are not the addressee, please promptly delete this message 
and notify the sender of the delivery error by e-mail or you may call Salinas 
Valley Memorial Healthcare System's Privacy Officer in Salinas, California, 
U.S.A. at (+1) (831) 755-0751.

Reply via email to