473,804 Members | 3,113 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VB6 -- getting data from Excel files ...

Hey ... I've got about 500 Excel files with data stored in them in tabular
format ... (my coworker used excel as a database).

I want to write a vb6 program that will open up these files and get the info
from each row, and store it in an MS Access database, or perhaps a
comma-delimited file.

How can I get into an excel file with VB6? I have VB6 enterprise, and I've
installed the "excel" data access components.

Thanks in advance
Jun 19 '06 #1
2 24714
sashi
1,754 Recognized Expert Top Contributor
Hi Robert,

believe me my fren.. i had a same problem with one of my client.. they have been using lotus 1-2-3 as their back-end.. 1st i converted the lotus 1-2-3 files to .xls format.. 2nd converted the .xls to sql server format.. i have listed 2 links below.. and really hope that it will be useful.. good luck my fren..


export excel file to SQL database..
http://www.planet-source-code.com/vb...=9042&lngWId=4

this code work on both ms access and sql as well provided you change the db connection string as needed..


read/write excel file using ADO - vb
http://www.planet-source-code.com/vb...=8413&lngWId=4
Jun 19 '06 #2
No worries
Just declare excel as an object
then use
object.document .open(name)
G = object.sheet1.c ells(x,y).value
G variable will change as x row y column changes
See OLE in HELP
Fast reply on the way out, just let you know thats its possible and in the
documentation.
My client has thousands of xls and I open any number of xls and reference
any thing dynamically.
David Merry
da******@optush ome.com.au

"Robert Dyke" <ro****@montana soft.com> wrote in message
news:wo******** *************** *******@bresnan .com...
Hey ... I've got about 500 Excel files with data stored in them in tabular
format ... (my coworker used excel as a database).

I want to write a vb6 program that will open up these files and get the
info
from each row, and store it in an MS Access database, or perhaps a
comma-delimited file.

How can I get into an excel file with VB6? I have VB6 enterprise, and
I've
installed the "excel" data access components.

Thanks in advance

Jun 24 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
3701
by: Ksenia Marasanova | last post by:
Hi, I have a little problem with encoding. Was hoping maybe anyone can help me to solve it. There is some amount of data in a database (PG) that must be inserted into Excel sheet and emailed. Nothing special, everything works. Except that non-ascii characters are not displayed properly. The data is stored as XML into a text field. When I use pgsql it's displayed good in the terminal. Now I run my script and print data
14
12868
by: atse | last post by:
Hi experts, I retrieve data from the database and display on ASP, then I export these data to a file, like Excel (the best) or text file. Is it possible? I think it is possible, but how can I do that? Thanks for any help. Atse
4
38519
by: Jean-Marie Delapierre | last post by:
Hi, I have two files in a directory. one called toto.txt with the following content : 1 2 3 4 5
3
5091
by: Wade G. Pemberton | last post by:
Help!: I use javascript to format repetitive data from a web page input FORM into a long string , and save it as lines of comma delimited data in a text file on a Unix server. The text file is meant to be downloaded to MS Excel on the users' computers. Several such files will be downloaded and appended into the Excel file. Problem: The text file looks good when viewed offline by any text reader, but Excel will not import it...
0
1563
by: Tim Brooks | last post by:
All, I'm hoping one of you Xml or Data gurus can offer an opinion. I'm working on an app to basically compare two semi-structured data files (e.g. Excel / CSV) to one another. But I need to compare them as if they were datatables... (ie a simple diff type tool won't work)... More specifically, the process I envision so far is: 1) Read in two files -- if Excel select appropriate sheet (would also require users to structure their...
0
2842
by: Jack | last post by:
Windows 2K Pro Access/Excel 2003 Hi there, I have a large number of password protected Excel Workbooks. The files are protected by code that runs when the workbook opens. The code asks the user to key in a password into an input box, the password is compared to a a partciular cell on a hidden (xlVeryHidden) sheet and if it matches the Workbooks opens. I have not used the usual Excel password protection as I need to provide for several...
15
4124
by: John Machin | last post by:
I am pleased to announce a new general release (0.5.2) of xlrd, a Python package for extracting data from Microsoft Excel spreadsheets. CHANGES: * Book and sheet objects can now be pickled and unpickled. Instead of reading a large spreadsheet multiple times, consider pickling it once and loading the saved pickle; can be much faster. * Now works with Python 2.1. Backporting to Python 2.1 was partially
3
5849
by: ArmageddonAsh | last post by:
I'm trying to make an application that will allow the user to enter data into a flexgrid (that's done) and then save the data from that flexgrid into a CSV file but even though the file is made none of the data from the flexgrid goes into the CSV file and so I have a couple of questions. 1, How do I make the application load the data from a specific CSV file? 2, How do I make it so that the user is able to add information to the data and...
3
7167
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all, I have a question for you. I have a .csv file which has many lines of data. Each line has many data fields which are delimited by ",". Now I need to extract part of data from this file but save it as an excel file. The data in this excel file will be imported into an Access database. The
0
9706
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10578
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10321
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10077
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7620
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6853
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5522
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2991
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.