Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

export data in specific format?

1 view
Skip to first unread message

FRAME888

unread,
Jan 8, 1999, 3:00:00 AM1/8/99
to
Hello,

Can anyone tell me how to export data from a speadssheeet to a text file that
must meet the follwoing criteria:

All fields must be separated by commas
All field with letters or strings they call them must be in qoutes
All numbers must be in no qoutes
an output might look like this:
"Monet, Claude","The artist's Garden", 89000000,1905,1998

I tried a simple export and it only makes it like this:
Monet, Claude,The artist's Garden, 89000000,1905,1998

I got around this by importing the xcel file to access and then exporting it to
text format but figured there must be an easier way of doing this in excel
itself?

Many thanks in advance ....
Joe Elyas

P.S. i am very new to this and if you can please give as detailed instructions
as much as you can.

Patrick Molloy

unread,
Jan 8, 1999, 3:00:00 AM1/8/99
to
Hi
chr(34) is the quote mark, so you could force this to the export field

strArtist="Monet,Claude"
strPainting="The Artist's Garden"
dRef=89000000
dPainted=1905
dBought=1998
sQ=chr(34)

Print #Export, sQ & strPainting & sQ, sQ & strArtist &
sQ,dRef,dPainted,dBought

alternatively, try saving the spreadsheet as a CSV ( comma separated
variables), then open it in say Notepad
When I tried, the artist name was in quotes but the painting name was not.
so again, you'd need to force the quote.

hope this helps
Patrick
_____


FRAME888 wrote in message <19990108012224...@ng06.aol.com>...

Joe Elyas

unread,
Jan 8, 1999, 3:00:00 AM1/8/99
to
Hi,

You know where do I type these and also does this works on a spreadsheet
that has more than 3000 rows?

I did try the CSV export but that does not work ...

Many thanks in advance ...

Joe Elyas

Patrick Molloy wrote in message <774eaf$1o5$1...@news.ml.com>...

Myrna Larson

unread,
Jan 8, 1999, 3:00:00 AM1/8/99
to
On 8 Jan 1999 06:22:24 GMT, fram...@aol.com (FRAME888) wrote:

>Hello,
>
>Can anyone tell me how to export data from a speadssheeet to a text file that
>must meet the follwoing criteria:
>
>All fields must be separated by commas
>All field with letters or strings they call them must be in qoutes
>All numbers must be in no qoutes
>an output might look like this:
>"Monet, Claude","The artist's Garden", 89000000,1905,1998
>
>I tried a simple export and it only makes it like this:
>Monet, Claude,The artist's Garden, 89000000,1905,1998
>
>I got around this by importing the xcel file to access and then exporting it to
>text format but figured there must be an easier way of doing this in excel
>itself?

XL doesn't have a built-in way to do this that you could access by clicking a
button or selecting a menu option.

You must do this by writing a macro in the VBA programming language. Patrick
Molloy has showed you the commands.

--
Myrna Larson
e-mail to: myrna...@csi.com

Joe Elyas

unread,
Jan 8, 1999, 3:00:00 AM1/8/99
to
This may sound stupid but I realize that this VB programming is going to
work but where do I type it. I am an absolute beginner in this field and I
have no clue...

Anyway, I went to tools, macro ... then it says record macro ?

I don't get it ...

Please excuse me if this is the wrong newsgroup for this question ...

I am trying to learn .... that's all?

Many thanks in advance for your help ..

Joe Elyas

DMcRitchie

unread,
Jan 8, 1999, 3:00:00 AM1/8/99
to
Hi Joe, (mailed and perhaps with an email copy)
Recording a macro:
Tools --> Record Macro
Then you do your things you want done in the macro, by manually making
those changes. When finished. Click on the black square to stop recording
(same marking as used on a VCR tape recorder).

Where to put your VBA code, depends on which Excel you are using. If you
created in XL95 you will find that a new Module sheet was created with your
macro in it. For XL97 it is handled a bit differently as there are no Module
sheets..

See highlighted area in my
http://members.aol.com/dmcritchie/excel/formula.htm        

I have instructions for installing XL95 which I have and also for XL97 (and
XL98) which I don't have.

For the real information try the HELP Ans Wizard
record macro

HTH,
David McRitchie

Joe Elyas

unread,
Jan 10, 1999, 3:00:00 AM1/10/99
to
Ok, I still can't do it ....

Anyway, If I can send someone my file, with a couple of sample data of
course, would it be possible to ask somebody to do the macro part for me?

I mean I can may be give you a poster from my web site or something for
compensation? Well, I don't want to give out the web sites name so I don't
come across as a spammer ... but I really need to get this done ...

If anyone is interested, please let me know ... :-)

If this post is inappropriate, please disregard and accept my apology...

Joe Elyas
DMcRitchie wrote in message
<19990108182847...@ng-fx1.aol.com>...

0 new messages