473,387 Members | 1,493 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,387 software developers and data experts.

Excel RowCount

I am using C# to import data from an Excel File, and
trying only want to get a rowcount of rows with data in
them, not 65536. Is there a way to do this, or do I need
to cycle through all the rows to determine if data
exists..?
Nov 13 '05 #1
1 5723
John,

I think that what you want to do is check the UsedRange property for the
Worksheet that you are looking at. Granted, you will have to make sure you
don't double-count rows, as the range that is returned to you can have
multiple ranges in it with rows overlapping. This should work for you
though.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- ni**************@exisconsulting.com

"John Barr" <jb***@toobrands.com> wrote in message
news:01****************************@phx.gbl...
I am using C# to import data from an Excel File, and
trying only want to get a rowcount of rows with data in
them, not 65536. Is there a way to do this, or do I need
to cycle through all the rows to determine if data
exists..?

Nov 13 '05 #2

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

Similar topics

2
by: David Reynolds | last post by:
Hi Everybody, I have a vb.net webform where I create the Excel application/workbook/worksheet. On Windows 2000 server for some reason, I keep getting an error("Bad variable type") when trying...
2
by: Geoff Jones | last post by:
Hi Can anybody tell me how to get the names of the worksheets in an Excel file without creating an Excel object i.e. Excel itself may not be on the machine using the application which looks at...
1
by: Nikolay Petrov | last post by:
I have to read data from MS Excel files and I use OLEDB reader for that. The problem I encounter is that I don't preliminary know the names of the sheets in the Excel files, so I can include them...
1
by: zacks | last post by:
Can this driver return to me the names of the active WorkSheets in an XLS file?
4
by: Peter | last post by:
Does anyone know a way to import excel data very fast? I have spreadsheet data that has to be processed, the spreadsheet has 256 columns and 20,000 rows of data. That's 5,120,000 cells. The...
5
by: Matt Bailey | last post by:
Good afternoon, I have an asp.net project wherein I am trying to export data into excel. I have that working, however, I am typically dealing with a large volume of data when I do this. Can...
2
by: surekhads | last post by:
Hi all, I have developed a project for extracting data from a HTML file and export that data to a excel sheet. I am storing that extracted data to the db. And then I am exporting that data...
6
by: rlntemp-gng | last post by:
I need to extract information from some Excel files but am stuck with part of it: As an example, I have the following Excel File that has 3 tabbed sheets: FileName: ...
1
by: DennisBetten | last post by:
First of all, I need to give some credit to Mahesh Chand for providing me with an excellent basis to export data to excel. What does this code do: As the title says, this code is capable of...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
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...
0
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.