Re: [BLACKBOX] Excel

From: [at]} <Gunnar>
Date: Mon, 1 Feb 2010 18:26:29 +0100

----boundary-LibPST-iamunique-2106815863_-_-
Content-type: text/plain

Doug,

ok - so your problem is how to READ data from an excel file as far as I
understand it.


Chris Burrows wrote:
> Doug,
>
> It depends on what the Excel file contains. If each cell just contains
> simple data like a number or a string then the file can be saved as a simple
> CSV or TSV text file. Similarly CSV and TSV files can be opened in Excel.
> However, it is not that easy if the file contains multiple worksheets,
> formulae, functions, cross-references etc. etc.
>
>
Agreed. Accessing output data with excel from your program should not be
a problem.

> [...]
> I am a novice to Excel. So the fields of the file are simply ','
> separated and
> the end of a row is just an eol?
>
> What is ADO?
>
>
> ActiveX Data Objects?
>
> Is that really necessary?
> -Doug
>
There are several ways of accessing data from MS-Excel:

A popular method for the world of COM-programming (this includes BB) is
ADO (ActiveX Data Objects). Don't panic ;-) this should not be as
complicated as it may sound. At least prototyping with VbScript is
really simple.
If you consider gpcp on .NET as an option, there is ADO.NET (probably
System.Data.OleDb). Tools for the developement of a prototype might
include iron python or boo. There is also a really useful IDE for gpcp
available, but you have to get acquainted with the .NET libraries.

The basic idea for both cases is to read the excel file line by line as
records from a data base, the first line indicating the field names and
the content of each column determining it's type. Since you use the
JET-driver, you may not need to have Excel installed on your computer
(I'm not sure).

There are probably other ways of accessing excel data without looking
into the details of the file format, but I never used any of them.

regards
gunnar


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-2106815863_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJu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boundary-LibPST-iamunique-2106815863_-_---
Received on Mon Feb 01 2010 - 18:26:29 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:30:35 UTC