Solved

Export Memo field to csv file

Posted on 2004-03-29
10
875 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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

912 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now