Export Memo field to csv file

Posted on 2004-03-29
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.


Question by:RBielecki
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
LVL 54

Expert Comment

ID: 10709256
LVL 50

Accepted Solution

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

Expert Comment

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.

(Please check: as routinet has now the possibility to ask deletion of the question!)
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

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

Author Comment

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

Expert Comment

ID: 12537441
Post a zero points question at with the URL of this question.

LVL 50

Expert Comment

by:Steve Bink
ID: 12538007 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.  :)

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

Suggested Solutions

Title # Comments Views Activity
Access Need to add combo box to sub form 10 51
Create a varying recordset 5 53
SQL 'Fuzzy' (any part of string matches) match on passed text string in SPROC. 14 57
This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Familiarize people with the process of utilizing SQL Server functions 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 Ac…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

734 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