473,397 Members | 2,116 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,397 software developers and data experts.

how to determine last row in excel?

170 100+
hi,

i'm using C in windows
hm...does anyone have any ideas how i can determine the last row number in an excel sheet using C?
Feb 26 '08 #1
3 2739
gpraghuram
1,275 Expert 1GB
hi,

i'm using C in windows
hm...does anyone have any ideas how i can determine the last row number in an excel sheet using C?

Try to search for MFC librariries to read EXCEL files.
I dont think so that are any available C Librarues to read excel files

Raghuram
Feb 26 '08 #2
poolboi
170 100+
hm...okok
it's alright...
do u know if in C we can if say for example an array is empty or has no value
how do we check for if an array is empty?
perhaps i could do a similar concept and check if a cell is empty for an excel
Feb 27 '08 #3
sicarie
4,677 Expert Mod 4TB
Excel spreadsheets have predefined "end" cells in both the row and the column. I forget what the number is, but it's very big.

What library are you using to open and access the Excel file? What you will need to do is look through that library for - as you say - some sort of "isEmpty()" function, and then you can test each row until you find an empty one, and then each column until you find an empty one. Subtract one from each and you have your final cell with value.

There are probably better ways to do this - there are great searching algorithms out there dealing with ants and swarm behavior, but I'm not sure if you want to implement one of those. Depends on your skill level and size of the project.
Feb 27 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

18
by: Christopher W. Douglas | last post by:
I am writing a VB.NET application in Visual Studio 2003. I have written a method that handles several events, such as closing a form and changing the visible status of a form. I have some code...
2
by: Regnab | last post by:
I've got my code working so that it'll count the number of columns in the table and move across (eg Range A-P and then range Q-W). Problem is when I get to the end of the single letters and get...
2
by: Shravan | last post by:
Hi, In my application I need to determine whether Excel is installed on my system or not. Can anybody tell me how to check that. Thanks, Shravan.
7
by: semedao | last post by:
Hi all, I view many posts about this issue , the connected property does not tell us the current status of the socket. based on couple of suggestions of msdn , and some article here , I try to...
6
by: magix | last post by:
Hi, when I read entries in file i.e text file, how can I determine the first line and the last line ? I know the first line of entry can be filtered using counter, but how about the last line...
0
by: thought.contagion | last post by:
I need to determine if Excel 2007 is installed. For Office 2003, we had the component ID for Excel 2003 and could use the msi.dll to enumerate and that would tell us if it was installed: iRet...
0
by: aliman | last post by:
Hi All, Coding in C#.Net 2.0 A requirement of my app is that certain functions should not be allowed to execute if excel is running. The app is used in terminal server sessions so checking if...
22
by: DThreadgill | last post by:
Hi all - having a bit of problem with this code. It works in one of the databases that I have but not the one I'm currently working with...I've compared references and they're both the same: When...
8
by: pinkfloydfan | last post by:
Hi there I have a form with two TextBoxes each of which has an _Enter event. In each case the _Enter event binds to the same Excel SheetSelectionChange event. What I want to know is: within...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
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...
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
jinu1996
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.