473,388 Members | 873 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

How to get the number of nonempty rows in excel application?

Hi, there,

I have an xls file, and need to get the number of nonempty rows from one
worksheet. How to know what is the last line of this worksheet?

I am using Microsoft Excel 9.0 library, Excel 2000, and C#.


Dec 30 '05 #1
1 9081

Check out the UsedRange property on the Worksheet. It will give you the
smallest grid on the worksheet which has all the content in it. However,
this might mean there are empty spaces in the content, but from there, you
can search it to filter out or find your items.

Hope this helps.
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Gary" <Ga**@discussions.microsoft.com> wrote in message
news:88**********************************@microsof t.com...
Hi, there,

I have an xls file, and need to get the number of nonempty rows from one
worksheet. How to know what is the last line of this worksheet?

I am using Microsoft Excel 9.0 library, Excel 2000, and C#.



Dec 30 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Alan | last post by:
Hi there, Are there Excel charting gurus here?? If so then please read on... Sorry for the cross-post but I'm not familiar with the Excel groups. I've posted to asp.general because if I have...
by: (Pete Cresswell) | last post by:
I see this coming on a develpment effort that may materialize shortly. These guys don't want to mess around with automated imports from text feeds BC in the past they've had too many problems...
by: Dixie | last post by:
How do I, in VBA from an access form module, add 5 rows to the top of a spreadsheet called MySpreadsheet.xls. The worksheet is called MyWorksheet and there is already data in the first 5 rows. I...
by: regis | last post by:
Greetings, about scanf matching nonempty sequences using the "%" matches a nonempty sequence of anything except '-' "%" matches a nonempty sequence of anything except ']" matches a nonempty...
by: deep022in | last post by:
guys, I have written a perl script using Win32::OLe module. I was able to read it completly. but I have to specify the number of rows in excel sheet as command line option. I want to know how...
by: sysmanint1 | last post by:
I am a total neophyte at Visual Basic but found the following post and reply from Clint concerning a dynamic range. Also, have never "posted" to a discussion I have made a macro that works on...
by: =?Utf-8?B?UHJpeWE=?= | last post by:
Hi, I'm faced with a classic problem of how to update a large number of records from a web page. I;m trying to build an interface that will display recordset in the order of 3000 rows and allow...
by: Christopher | last post by:
Hello, I am writing a little application which uses a template excel file and adds some information and then stores the changed file. The problem is, i don't really know how to add these rows...
by: evenlater | last post by:
I have an Excel workbook that I'm programming from Access. The rows in the workbook vary in height. So let's say row 8 is taller than the rows above it. If I *manually* insert 2 new rows at the...
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.