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.
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>...
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>...
>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
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
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
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>...