Solved

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

Posted on 2016-11-29
18
31 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
  • 10
  • 7
18 Comments
 
LVL 12

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
 

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
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
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…
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…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

895 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

14 Experts available now in Live!

Get 1:1 Help Now