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

VB6 Beginner Needs Help Reading Excel into VB6 and Writing Back to VB6

I have about 400 rows of data in Excel. Each Row is a record set. I want to read each cell in each row into VB6 (one row at a time) and then do calculations on the cells in the same row and then rewrite them back to a new Excel file.

When my progam starts I'm able to assign (for example) A1 to a variable and B1 to a variable, and so on and can then do my calculations. But how do I make my program go to the next row (for example) A2, B2, C2....and then A3, B3, C3...so on, so i can run calculations on each successive row. And how will I let VB know I've reached end of last record?

Thank you for your assistance, any help will be greatly appreciated.

David
Mar 2 '07 #1
1 1314
vijaydiwakar
579 512MB
I have about 400 rows of data in Excel. Each Row is a record set. I want to read each cell in each row into VB6 (one row at a time) and then do calculations on the cells in the same row and then rewrite them back to a new Excel file.

When my progam starts I'm able to assign (for example) A1 to a variable and B1 to a variable, and so on and can then do my calculations. But how do I make my program go to the next row (for example) A2, B2, C2....and then A3, B3, C3...so on, so i can run calculations on each successive row. And how will I let VB know I've reached end of last record?

Thank you for your assistance, any help will be greatly appreciated.

David
u connect to excel with the help of dsn then use select * from sheet1 range(A1:last right column)

try this or if not done then i'll give u d code but first try it
don't worry i've d sol
Mar 2 '07 #2

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

Similar topics

6
by: Paul | last post by:
I was wondering if anyone has had an issue where using vba code to read an excel file and import the data into an access table some records are not imported from the excel file. It seems looking at...
46
by: Keith K | last post by:
Having developed with VB since 1992, I am now VERY interested in C#. I've written several applications with C# and I do enjoy the language. What C# Needs: There are a few things that I do...
5
by: Scott M. Lyon | last post by:
I've just discovered a bug in some code I wrote a little while ago, and I need you guys' help to fix it. My program imports data from a standard Excel Spreadsheet (just with specific column...
0
by: Jarkko Turpeinen | last post by:
I'm a beginner in XML language and I'm trying to create an XML file that could be viewed in Excel as a table that has rows and columns like this: Q1 Q2 Row1 3 5 Row2 4 1 Row3 2 3 But...
191
by: Xah Lee | last post by:
Software Needs Philosophers by Steve Yegge, 2006-04-15. Software needs philosophers. This thought has been nagging at me for a year now, and recently it's been growing like a tumor. One...
9
by: dba123 | last post by:
I need some help and direction on what classes and an example or two (article) on how to read an Excel Worksheet and insert one column into a database table column. I am using .NET 2.0 only. What...
3
by: thedouble13man | last post by:
I am relatively proficient with VBA and primarily use it for Excel. I am trying to do something that seems as though it should be easy but I have been struggling and cannot seem to figure it out...
2
by: Matt | last post by:
I've coded using VBA on top of MS Excel for the last 2 years (40 hours a week). I've stepped up to VS C# 2005 Express / SQL Server 2005 Express a couple months ago, but the videos that I downloaded...
22
by: ddg_linux | last post by:
I have been reading about and doing a lot of php code examples from books but now I find myself wanting to do something practical with some of the skills that I have learned. I am a beginner php...
0
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
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?
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.