Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Excel and VB.NET Help!!!

Hello,

If I am in the wrong place, I apologize and please let me know.

I need a sample if anyone can provide it or a link for how I can
programmatically access row by row; 1 column of data in Excel.

I have created a program that exports data from a database into an Excel
spreadsheet and now I'd like to query a specified column in the sheet and
read the values contained in the underlying rows to see if a certain
condition is met.

Though guidance in VB.NET would be desirable, I will accept any VB or VBA
examples because I can convert the logic.

Any help would be appreciated!

Thanks,

mivey4


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,173
Default Excel and VB.NET Help!!!

Mivey

You would use a range object variable and iterate through the column to test
the value. In VBA this would be

Sub IterateColumn()
Dim myCell as Range
For Each myCell in Range("A1:A100")
'Do test here
Next MyCell
End Sub

Of course you could also assign the cells used to a variable and loop this
number of times using either cells or range objects

Range("A" & myVariable).Value
Cells(myVariable,1).Value

If you need more help getting it to VB.Net post back. I'm just starting out
with it, but we may be able to help


--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
www.nickhodge.co.uk
HIS


"mivey" wrote in message
...
Hello,

If I am in the wrong place, I apologize and please let me know.

I need a sample if anyone can provide it or a link for how I can
programmatically access row by row; 1 column of data in Excel.

I have created a program that exports data from a database into an Excel
spreadsheet and now I'd like to query a specified column in the sheet and
read the values contained in the underlying rows to see if a certain
condition is met.

Though guidance in VB.NET would be desirable, I will accept any VB or VBA
examples because I can convert the logic.

Any help would be appreciated!

Thanks,

mivey4



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel and VB.NET Help!!!

actually you should post that in other forums for programming vB or whatever
look into MsDN ( microsoft developers network ) and find the excel.worksheet
object there are the methods, properties and all you need to manage
worksheets from your application with good explanations for VB and c++ ( not
for delphi :S ) anyhow there is where you can find all the info.

also look at excel.workbook and excel.application for more complex stuff

ttfn

"mivey" wrote:

Hello,

If I am in the wrong place, I apologize and please let me know.

I need a sample if anyone can provide it or a link for how I can
programmatically access row by row; 1 column of data in Excel.

I have created a program that exports data from a database into an Excel
spreadsheet and now I'd like to query a specified column in the sheet and
read the values contained in the underlying rows to see if a certain
condition is met.

Though guidance in VB.NET would be desirable, I will accept any VB or VBA
examples because I can convert the logic.

Any help would be appreciated!

Thanks,

mivey4



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 12:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"