Solved

MS Access CSV Text File Export UTF-8 Separator Delimiter Not Exporting Correctly

Posted on 2016-11-29
18
46 Views
Last Modified: 2016-11-29
I am just all confused here but I see what is causing some of my issues but just don't know how to fix them. I need to export a CSV file in UTF-8 Encoding. This file is for products. I have done that BUT.... in the my field [SkuDescr] (Description) if I have a string of text and then place another string of text below the first and so on in the CSV file export it makes several rows for each string of text causing all kinds of misalignments in the file and messing everything up.

[SkuDescr] is short text 255 length

Example in SkuDescr:

Replaces Models:
G547UJ
AE45T6
J7L97
Width 3/4"
Height 1"

Thanks!
0
Comment
Question by:Dustin Stanley
[X]
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
  • 10
  • 7
18 Comments
 
LVL 13

Assisted Solution

by:Jeff Darling
Jeff Darling earned 250 total points
ID: 41905972
Are your quotes escaped?
0
 

Author Comment

by:Dustin Stanley
ID: 41905974
I am not exactly new to CSV files but besides simple ones I am not familiar with. What exactly do you mean by escaped Quotes? I thank you for your help.
0
 

Author Comment

by:Dustin Stanley
ID: 41905992
Here is an example I used NotePad to collect this info:
1599,"Blower Wheel S990 990 Metal","JONE","990","DOES NOT APPLY","3.75 Wide by 2.375 Tall Inches

REPLACES:
S990
777
0118
20134
0290
20118
20134","","","","VJBP5CP","",
1600,"S89852 89852 Vent cover Without Lens","JONE","89852","DOES NOT APPLY",,"","","","TH0A6","",

Open in new window


1599 and 1600 are the individual product SkuIDs. So 1599 and 1600 are two different products.

on 1599   3.75 Wide by 2.375 Tall Inches is where the Skudescr starts and 20134 is where it ends

On 1600 it does not have any if in the Skudescr
0
MS Dynamics Made Instantly Simpler

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

 

Author Comment

by:Dustin Stanley
ID: 41906060
OK When I import my file into where I want and use that specific software it understands and imports it fine but why is it not showing fine in Excel or CSVed (Software) when I try to just view it before trying to import it where I truly need it?

I need a way to Preview it correctly before importing it where I need. Especially when there are 1000's of records.
0
 
LVL 45

Expert Comment

by:aikimark
ID: 41906062
One problem is that you have a comma at the end of your 1599 record, which may 'trick' the consuming CSV code that the 1600 data is just  part of the 1599 record.  This is a problem caused when you have imbedded Cr or Lf characters in a CSV field.

Escaped quotes could be a pair of quotes.
0
 

Author Comment

by:Dustin Stanley
ID: 41906067
I do have Carriage Returns in the database and I truly need them in the SkuDescription. How can I work around this without stripping them away or such?  When there is no carriage return it just looks like a big MumboJumbo Mess!
0
 
LVL 45

Accepted Solution

by:
aikimark earned 250 total points
ID: 41906068
Rather than Notepad, try using Notepad++ and look at all the characters.  Pasting text from the clipboard can change your data, so it would be helpful if you uploaded a text file.
0
 

Author Comment

by:Dustin Stanley
ID: 41906071
Notepad++ it looks the same also. I thought Notepad would not cause copy paste issues like most software?
0
 
LVL 45

Assisted Solution

by:aikimark
aikimark earned 250 total points
ID: 41906072
You can go the regex route and substitute \r or \n or \r\n in place of the Cr Lf or CrLf sequences in the field.  If you have CrLf in the field, try using one of the single character alternatives.  Excel can usually read and render that.
0
 
LVL 45

Assisted Solution

by:aikimark
aikimark earned 250 total points
ID: 41906075
are you viewing all the characters (both invisible and visible)?
0
 
LVL 45

Expert Comment

by:aikimark
ID: 41906079
Since you used imbeded (field content) quotes in your question, please include that in your posted data examples.  Also, please use the CODE snippet link above the comment box.
0
 

Author Comment

by:Dustin Stanley
ID: 41906084
Oh by the way 1599 should have a comma after it. SkuID is 1599 then SkuNm is Blower Wheel S990 990 Metal.

I am exactly set on Excel but I just need a way to preview it properly before saying ok take off and a whole day is wasted when a import has gone wrong.

I appreciate the help!

are you viewing all the characters (both invisible and visible)?
Not sure what you mean so probably not.

Also, please use the CODE snippet link above the comment box.
Sorry
0
 

Author Comment

by:Dustin Stanley
ID: 41906090
are you viewing all the characters (both invisible and visible)?
In Notepad++ I am now thanks
0
 

Author Closing Comment

by:Dustin Stanley
ID: 41906097
Notepad++ with all characters will help me weed this problem out. Thanks!
0
 
LVL 45

Expert Comment

by:aikimark
ID: 41906098
You misunderstood me.  The extra comma I referenced is at the end of the 1599 LINE, not immediately after the "1599" characters in the first line.
0
 

Author Comment

by:Dustin Stanley
ID: 41906105
Ok I see what you are saying. In Notepad++ it shows me a CRLF at the end now.  On CSV files to go to a new line is there supposed to always be a CRLF? I just thought it counted the headers and knew when to return to the next line.
0
 
LVL 45

Expert Comment

by:aikimark
ID: 41906163
Generally, in a Windows environment, each line should end in a CrLf sequence.  There is no guarantee that the number of fields in each record/line will match the number of fields in the header.
0
 

Author Comment

by:Dustin Stanley
ID: 41906166
Great to know! Thanks for the help!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
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 …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

752 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