Can Excel read a Pascal binary file? 
Author Message
 Can Excel read a Pascal binary file?

I would appreciate learning how to make Excel read a Turbo Pascal binary
data file.  Thanks.  Stan

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Fri, 06 Sep 2002 03:00:00 GMT  
 Can Excel read a Pascal binary file?
This is likely going to be difficult, perhaps impossible.  You might be able
to construct your Pascal program to write data that "mimics" the Excel
binary format, but I suspect this would be no easy task.  If you have
pre-existing Pascal binary data that you wish to read into Excel, my guess
is that you'd be out of luck.

There are two ways to go.  One is to re-do the Pascal program and write out
the data to a Text file, which is very easy to read with Excel, particularly
if you take some care in lining up the columns.

On the other hand, if the data already exists, and "rewriting" it is not an
option, then you should look at using some other program (not Excel) to read
the data for you.  One that comes to mind is Pascal -- write a Pascal
program to read the (binary) data and rewrite it as text.  Another way to do
this is to use a program such as Matlab which can be told to read in
structured data.  Note that you'll need to know the structure of the data
(e.g. "lines consisting of 2 32-bit integers, 3 4-byte reals, a 40-character
string, and two more integers") for either scheme to be effective.

Bob Schor
Pascal Enthusiast

Quote:

> I would appreciate learning how to make Excel read a Turbo Pascal binary
> data file.  Thanks.  Stan

> Sent via Deja.com http://www.deja.com/
> Before you buy.



Fri, 06 Sep 2002 03:00:00 GMT  
 Can Excel read a Pascal binary file?

Quote:

> I would appreciate learning how to make Excel read a Turbo Pascal binary
> data file.  Thanks.  Stan

As Bob Schor already mentioned you will have little luck with
binary files.

I often create the "delimited with comma" type of textfiles.
With German versions it is necessary to delimit with a semicolon.

It works pretty well. Numbers are simply represented as usual
with the number conversion in the built in write(T,....) instructions,
strings, date and time should be surrounded with "xxx".
Each line in Excel is a textline, example:
  Writeln(T,'"',date2str(date),'",',numval:1:3,',',intval:1,','....
--
Franz Glaser, Glasau 3, A-4191 Vorderweissenbach Austria +43-7219-7035-0
Muehlviertler Elektronik Glaser.  Industrial control and instrumentation
http://members.eunet.at/meg-glaser/    http://members.xoom.com/f_glaser/
http://www.geocities.com/~franzglaser/            http://start.at/bedarf



Fri, 06 Sep 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. HELP : Reading EXCEL file by Turbo Pascal

2. Reading binary files in pascal

3. Reading binary files in PASCAL ??

4. reading excel files

5. How to read a EXCEL.XLS file ?

6. Reading Excel 97 files with D2

7. Reading Excel files

8. Read Excel files?

9. Read Excel files?

10. Reading Excel Files thru ODBC

11. Reading Excel files in BPW

12. Help : Anyone know how to read/write from/into Excel files

 

 
Powered by phpBB® Forum Software