[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: EL Coding: How to write a double-quote character, ", to a file <- a solution



PureBytes Links

Trading Reference Links

OK, reading your problem description again, you nreally have the " problem
not "," problem that I was solving...  Anyway, using something like "_" in
place of " in EL, and later doing "replace all" after you open the thing up
in Excel should work fine.  You could even have the macro automaticallyn
executed so you'd have less trouble yourself.

Ivo

-----Original Message-----
From: Ivo Karindi [mailto:ivo@xxxxxxxxx]
Sent: Saturday, January 19, 2002 1:19 PM
To: Bob Hunt; Peter B. Nelson
Cc: code-list@xxxxxxxxxxxxx; Omega List
Subject: RE: EL Coding: How to write a double-quote character, ", to a file
<- a solution

Now I don't know if this will work in earlier or later versions of Excel,
but it works in 2000.

The solution is simply to use a character that does not have any meaning for
Excel functions, something like "_", "~", "|", or "z".  This is a
no-problems job for Easy Language.  Save this file as a *.txt file, not
*.csv.  Then, when importing the file into Excel, check "Other" as a
delimiter option, and specify your character.  Like this:

File created with Easy Language:

1_2_3_=(A1+B1)^C1_"=A"
2_3_4_=(A2+B2)^C2_"=B"
3_4_5_=(A3+B3)^C3_"=C"
4_5_6_=(A4+B4)^C4_"=D"

IMPORTANT!  This file HAS to be saved as a *.txt, *.dat, or something else
(you can even make it up yourself, *.ivo for example ;-), but NOT as *.csv.
Excel will import *.csv files automatically as comma-delimited.  For other
files, you'll get the import wizard with more options.

Then import the file into Excel, specifying "_" as the delimiter.  This will
work equally well when importing the file using VBA or macros.  In Excel,
the sheet with imported file will look like this:

1       2       3       27      "=A"
2       3       4       625     "=B"
3       4       5       16807   "=C"
4       5       6       531441  "=D"

Hoping this solves the problem,

Ivo




-----Original Message-----
From: Bob Hunt [mailto:RHunt@xxxxxxxxxxxxxxx]
Sent: Friday, January 18, 2002 11:56 PM
To: Peter B. Nelson
Cc: code-list@xxxxxxxxxxxxx; Omega List
Subject: Re: EL Coding: How to write a double-quote character, ", to a file

Peter,

I'd love to hear a solution for this too. The best that I've come up with is
to use
a character not used often to stand in its place (such as the ` character),
and
then create a macro to do a find and replace.

Bob Hunt



"Peter B. Nelson" wrote:
>
> Fellow EL Coders,
>     Does anyone know how to get a double-quote character, ",  into a
string
> using EasyLanguage?  I need to write one into a file for Excel .CSV
parsing.
> I looked for, and didn't find, an escape character, a char(34) funtion,
and
> so on.
>     Any help is appreciated.
>
> Regards,
> Peter Nelson