Re: Fastest way to read data to populate combo controls?
- From: "Ralph" <nt_consulting64@xxxxxxxxx>
- Date: Wed, 17 Sep 2008 09:49:31 -0500
"Ed from AZ" <prof_ofwhat@xxxxxxxxx> wrote in message
news:f61c5ea6-bbb8-4c32-b148-de4bf2ae17b9@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi, Ralph.
Why not simply write the Excel data to a .csv or .tsv (tab) then read into
VB app.
I'm not understanding you, probably because I've never tried to do
anything like that before.
I keep a "master list" of the Word docs and their attributes in the
Excel file and maintain it at my leisure. When I'm done making
changes to it, I run the Excel macro to create my "data list" (Word
doc with tables) for the VB app to read when I run the app. That may
be hours or even days later - the VB app never touched the Excel file.
I can understand how to tell VB to go to this table and iterate
through the rows, putting the text in Cell(x,1) into ArrayA(x,1), and
Cell(x,2) into ArrayA(x,2). I've never worked with a .csv or .tsv
data file before.
============================
You meant Lorin not Ralph.
Office products can be used together in mulitple ways allowing one to build
some amazing solutions, but this interoperability has never been considered
'fast'. So what Lorin was pointing out is that you could easily skip the
"Word Data List" entirely. Which would speed up the process as well as
simplifying it.
A .csv file is a flat file that contains data separated by commas, and rows
separated by a carriage return, eg:
"John","Brown",21,...,...
"Billy","Black",34,...,...
A .tsv file is a flat file that contains data separated by tabs, and rows
separated by a carriage return, eg:
"John"[TAB]"Brown"[TAB]21[TAB]...[TAB]...[TAB]
"Billy"[TAB]"Black"[TAB]34[TAB]...[TAB]...
The quotes are optional - sometimes included to indicate the value is a
string.
You can create these files directly from Excel [Data Export] manually, or by
using a Macro.
VB can read these flat files far faster than it takes to create and read a
Word Data List. In one gulp and deliver the data as an array to be mined.
If you provide Lorin with an example of what your data looks like, and what
goes into what array. He or someone else can show you exactly how to do it.
-ralph
.
- Follow-Ups:
- Re: Fastest way to read data to populate combo controls?
- From: Ed from AZ
- Re: Fastest way to read data to populate combo controls?
- References:
- Fastest way to read data to populate combo controls?
- From: Ed from AZ
- RE: Fastest way to read data to populate combo controls?
- From: Lorin
- Re: Fastest way to read data to populate combo controls?
- From: Ed from AZ
- Fastest way to read data to populate combo controls?
- Prev by Date: Re: Opening statement to end code if condition occurs
- Next by Date: Re: Accessibility, irregular controls
- Previous by thread: Re: Fastest way to read data to populate combo controls?
- Next by thread: Re: Fastest way to read data to populate combo controls?
- Index(es):
Relevant Pages
|
Loading