Advertisement

08.27.2007 at 03:56PM PDT, ID: 22790356
[x]
Attachment Details

How to iterate and retrieve EXCEL Worksheet cell contents through VB6 and EXCEL OLE Automation

Asked by jxbma in Microsoft Excel Spreadsheet Software, Miscellaneous Programming, Visual Basic Programming

Tags: , ,

Hi:

I need to use MS VB6 and OLE Automation to open an EXCEL worksheet and retrieve cell data.

Is there a clean way to iterate over the rows and columns in a worksheet through automation?
I could blindly loop through all the cells from 0 through N, but there must be a more effecient way to do so?

Once I've figured this out, how do I retrieve the text contained in a cell?

I'm using VB6 and then Excel 11.0 object library.
It doesn't seem to support Row, Column and Cell objects directly. Is this truly the case?

Thanks,
JohnBStart Free Trial
[+][-]08.27.2007 at 04:46PM PDT, ID: 19779435

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.27.2007 at 05:29PM PDT, ID: 19779578

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.27.2007 at 05:41PM PDT, ID: 19779620

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Excel Spreadsheet Software, Miscellaneous Programming, Visual Basic Programming
Tags: excel, iterate, cell
Sign Up Now!
Solution Provided By: matthewspatrick
Participating Experts: 2
Solution Grade: A
 
 
[+][-]08.27.2007 at 05:57PM PDT, ID: 19779679

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]08.27.2007 at 06:46PM PDT, ID: 19779828

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.27.2007 at 07:00PM PDT, ID: 19779885

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628