|
-
Jun 1st, 2007, 01:19 PM
#1
Thread Starter
New Member
working with excel file...
Hi,
I have a problem...I want to do the difference of stock value in two columns wich they are in two different excel file. In file1.xls there are products and how many exists and the other one contain products and how many must be (minim stock). I need to find the difference between e.g. book1....6pcs and book1......3pcs.
iF YOU HAVE SOME TIME FOR MY PROBLEM, please give me an exemple.
Thanks a lot!
-
Jun 1st, 2007, 01:23 PM
#2
Re: working with excel file...
Welcome to the forums. 
Basic question: Do you have the code in place to connect to, and open, both files already in place in your VB6 project?
In other words, the only thing you need is suggestion on how to do the comparison, right? Everything else is working?
-
Jun 1st, 2007, 01:29 PM
#3
Thread Starter
New Member
Re: working with excel file...
thanks for your answer.
I need to help me to connect ADO with excel files and to do the comparison... It's enough for begin the application, I do some applications but with MSAcces
thanks again
-
Jun 1st, 2007, 01:37 PM
#4
Re: working with excel file...
Ok, we need to start with the basics.
For that, please go through si_the_geek's excellent tutorial on Automating Excel With VB6 tutorial.
-
Jun 1st, 2007, 01:42 PM
#5
Re: working with excel file...
After you have gone through the tutorial and are comfortable with its code and concepts, have a look
at one of these to see if they fit your needs.
-
Jun 1st, 2007, 01:53 PM
#6
Thread Starter
New Member
Re: working with excel file...
thanks, your links are verry good.
Now, I want to solve alone the problem.
-
Jun 1st, 2007, 01:53 PM
#7
Re: working with excel file...
Thanks for the compliment Hack, but I think in this case ADO would be a better idea than automation.
I don't use Excel that way myself, but somebody posted a useful link about it the other day: http://support.microsoft.com/kb/278973
Using this you should be able to connect to the files, but it would be much easier if you have both sheets in the same workbook - as you can then join the 'tables' easily (I'm not even sure if it is possible to work with 'tables' in different files).
-
Jun 1st, 2007, 02:04 PM
#8
Thread Starter
New Member
Re: working with excel file...
I have an idea... i try to send the both columns in MSAcces with ADO, then it easy for me to do the difference of quantity products. It's a good idea?
But, joing the columns into one workbook is it a good thinks...
-
Jun 1st, 2007, 02:11 PM
#9
Thread Starter
New Member
Re: working with excel file...
my problem is to chek the quantity products from an excel files (basic) with minim quantity products from an excel file create from me (minim stock) and if quantity is almost with minim stock a message apear.
-
Jun 1st, 2007, 03:03 PM
#10
Re: working with excel file...
If the data is in existing file(s), the simplest solution is to use a query to Join them. You could import the data into MS Access, and I think that would be better than importing both sheets into the same Excel file.
However, the bold part of your post ("file create from me") means that there may be better methods. How are you creating this file? Are you creating it with a program/macro from another source?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|