Convert data files to Excel

Chris Sharman chris.sharman@ccagroup.co.uk
Tue, 11 Dec 2001 11:03:35 -0000


I've looked at .slk before, in the hope that it could do more than .csv, but
I never got to first base.
I understand the 'C' lines below, but not the rest: have you any more
documentation please ? Also some indication of the capabilities of .slk,
compared with .csv ?

I would have written the file below as a csv:
Name   ,Title     ,Salary,Linenumber

Jari   ,Programmer,Less  ,     1
Michael,Boss      ,More  ,     2

Excel/csv: doesn't seem to care much about quotes, except to handle embedded
commas;
isn't smart about column width (all become standard width);
can cope with wrapped lines (just put the right number of commas on a page
heading);
doesn't support formulae (afaik), macros, keystrokes, multiple sheets, etc.

Thanks, Chris Sharman

-----Original Message-----
From: jari.s.kaljunen@telia.se [mailto:jari.s.kaljunen@telia.se]
Sent: 11 December 2001 10:35
To: mx% dmthomas@longfibre.com; mx% powerh-l@lists.swau.edu
Subject: SV: Convert data files to Excel


There is a file format called SYLK  (default suffix .slk) and which is
possible to open direct with Excel.

A sylk file looks like this:

ID;PWXL;N;E
P;PGeneral
P;P0
P;P#,##0
F;P0;DG0G8;M255
B;Y21;X4;D0 0 20 3
O;L;D;V0;K47;G100 0.001
F;P2;FF2G;C4
C;Y1;X1;K"Name"
C;Y1;X2;K"Title"
C;Y1;X3;K"Salary"
C;Y1;X4;K"Linenumber"
C;Y2;X1;K"Jari"
C;Y2;X2;K"Programmer"
C;Y2;X3;K"Less"
C;Y2;X4;K 1
C;Y3;X1;K"Michael"
C;Y3;X2;K"Boss"
C;Y3;X3;K"More"
C;Y3;X4;K2
E

Note the Y and X coordinates and quotes with charachter strings.

You can experiment with this by creating a Excel file and saving it as
Sylk file and editing the file. You will see that Excel creates much of
stuff in the beginning of the file (but only a little of it is really
needed).

We create first a subfile having the record number ( X coordinate) and
item number ( Y coordinate) and the item value. Then we run a quiz that
creates text file that is renamed to *.xls and it opens direct in Excel
on PC.


$quiz
acc *sub_item

init head &
tab 1 'ID;PWXL;N;E' &
skip tab 1 &
'P;PGeneral' &
skip tab 1 &
'P;P0' &
skip tab 1 &
'P;P#,##0' &
skip tab 1 &
'F;P0;DG0G8;M255' &
skip tab 1 &
'B;Y21;X4;D0 0 20 3' &
skip tab 1 &
'O;L;D;V0;K47;G100 0.001' &
skip tab 1 &
'F;P2;FF2G;C4'

sel if d_elem <> '" "' and d_elem <> ""

set rep nolimit spacing 0 dev disc name sylk nohead page length 0 width
255

def d_rad char*252 = &
  trunc(pack('C;Y' + ascii(rec_no) + ';X' + ascii(item_no) + ';K' +
d_elem ))

rep tab 1 d_rad
final foot tab 1 "E"
go


/Jari

-----Ursprungligt meddelande-----
Från:	dmthomas@longfibre.com [SMTP:dmthomas@longfibre.com]
Skickat:	 den 11 december 2001 01:00
Till:	powerh-l@lists.swau.edu
Ämne:	Convert data files to Excel

I'm trying to move a quiz subfile to Excel. I've emailed myself a text
file that I've renamed with the excel file extension which works fine
except when opening it, I have to tweek it a bit to make the columns fit
correctly.  I've delimited this file with a "|" and with a ",". Both do
the same thing.  I would like to be able to have this file open without
having to tweek the file. Any suggestions?


= = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l@lists.swau.edu
Subscribe: "subscribe" in message body to
powerh-l-request@lists.swau.edu
Unsubscribe: "unsubscribe" in message body to
powerh-l-request@lists.swau.edu
http://lists.swau.edu/mailman/listinfo/powerh-l
This list is closed, thus to post to the list you must be a subscriber.
 <<Fil: Convert data files to Excel.TXT>>


= = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l@lists.swau.edu
Subscribe: "subscribe" in message body to powerh-l-request@lists.swau.edu
Unsubscribe: "unsubscribe" in message body to
powerh-l-request@lists.swau.edu
http://lists.swau.edu/mailman/listinfo/powerh-l
This list is closed, thus to post to the list you must be a subscriber.
----------------------------------------------------------------------------
----
Date: Tue, 11 Dec 2001 11:26:21 +0100



-----------------------------------------------------------------------

Any views expressed in this message are those of the sender and not
necessarily those of CCA Group.  The unauthorized use, disclosure,
copying or alteration of this message is forbidden.  The contents of
this message may be confidential and/or privileged, copyright CCA Group
and are intended solely for the use of the individual or entity to whom
they are addressed.  Whilst this message has been scanned, CCA Group
cannot guarantee that it is virus free or compatible with your systems
and accepts no responsibility for any loss or damage arising from its
use. The recipient is advised to run their own anti-virus software. If
you receive this message in error please contact
postmaster@ccagroup.co.uk immediately, destroy any copies and delete it
from your computer systems.