Solved

Export Memo field to csv file

Posted on 2004-03-29
10
890 Views
Last Modified: 2007-12-19
I have a table with Memo fields that contain "dirty" unstructured data - characters within the fields include commas, quotes, html (<br>, etc.).  These memo fields are used to display direction sets to physical locations (ex. 12345 Smith Street).

I need to export these fields in csv format for inclusion in an email.  

However, I can't get these fields to export "nicely" - a single line per record set.

When I attempt to view the data using any number of editors (ultra edit, etc....even notepad), it's badly formatted.

Suggestions?

0
Comment
Question by:RBielecki
  • 3
  • 3
10 Comments
 
LVL 54

Expert Comment

by:nico5038
ID: 10709256
0
 
LVL 50

Accepted Solution

by:
Steve Bink earned 125 total points
ID: 10709342
I don't think you'll be able to get them to export 'nicely'.  A CSV file is usually delimited.  That means commas, colons, etc., are used to separate the fields for each record.  Since your memo field uses these characters as data (including quotes) that method will not work for you.

The other option is a structured csv file with a set number of character positions per field.  I wouldn't exactly call the resulting file 'nicely' exported since it will not necessarily be in a readable format.  There's also no guarantee that the memo field will be all on one line since it obviously can incorporate line feeds and carriage returns in the text.

Is there a reason you need it to be a text file as opposed to a binary file?  You may just have to accept the poor formatting otherwise...
0
 
LVL 54

Expert Comment

by:nico5038
ID: 12514536
Dear RBielecki,

Giving a "C" grade without explanation isn't really encouraging experts to help you.
When you're not satisfied with the proposed solution the proper action is to add a comment what's missing in the comment(s) to enable us to help you further.

Nic;o)
(Please check: http://www.experts-exchange.com/help.jsp#hi73 as routinet has now the possibility to ask deletion of the question!)
0
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 
LVL 50

Expert Comment

by:Steve Bink
ID: 12537279
Quite so...and I object to the grade.  

I offered all the relevent information I had given the description of the problem.  Since the questionner never replied to my request for more information (i.e., is a text file mandatory), neither of us were able to explore other options with them, such as binary data files, VB routines to format the memo field, exporting to an HTML page, or normalizing the memo field into a secondary table.

Even without that, assuming that it MUST be a text file and the memo field cannot be changed at all, my solution was to accept the poor formatting, since that is pretty much the only path available.  As we are all well aware, "can't be done" is sometimes a valid solution...

http://www.experts-exchange.com/Community_Support/Q_21200518.html
0
 

Author Comment

by:RBielecki
ID: 12537338
You make a valid point and I'm OK assigning a higher 'grade.'  What's the best way to rectify?
0
 
LVL 54

Expert Comment

by:nico5038
ID: 12537441
Post a zero points question at http://www.experts-exchange.com/Community_Support/ with the URL of this question.

Nic;o)
0
 
LVL 50

Expert Comment

by:Steve Bink
ID: 12538007
LOL...how many requests ended up getting posted?

RBielecki: Would you please let me know what route you eventually decided on with this project?  I had several ideas on how to start looking at this, and if you have come up with another I can add it to my arsenal.  :)
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question