473,387 Members | 1,876 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Importing a CSV file that contains trailing spaces - converts it to “á” special char

133 100+
I need to prevent access from importing a CSV file that contains a field with trailing spaces that gets converted into a special character, such as “á.” The import specification file requires all fields to be imported as text. The import statement is straight forward and doesn’t cause any issues, which is listed below.
Expand|Select|Wrap|Line Numbers
  1. DoCmd.TransferText acImportDelim, "SO_Data Import Specification", "SO_Data", "\\nbpcafile01.core.umdnj.edu\CA\Purchasing\Shared\SCM IT\eProcurement\MarketPlace Data\data\SO_Data.csv", True 
Any suggestions would be greatly appreciated.
Jan 7 '13 #1
7 2828
NeoPa
32,556 Expert Mod 16PB
DowlingM815:
I need to prevent access from importing a CSV file that contains
Do you really mean you want to prevent the import, or do you mean prevent the data from being converted to special characters?

Whichever, you need to post some example data and explain clearly what the results are. What you say so far is pretty unclear.
Jan 7 '13 #2
dowlingm815
133 100+
The data needs to be imported as its original CSV value. For example, in the CSV file, the product description field contains the following value:

Expand|Select|Wrap|Line Numbers
  1. "SCRUBBRUSH SURG W/ CHLORHEX GLU "
When it is imported into Access, the field is converted into:

Expand|Select|Wrap|Line Numbers
  1. "SCRUBBRUSH SURG W/ CHLORHEX GLUá"
Jan 8 '13 #3
NeoPa
32,556 Expert Mod 16PB
Strange. I can only guess that what appears to be a space when you look at it, is in fact another character that simply shows as a space in whatever software you're using to look at it. Could you post it in a ZIP file as an attachment for me to look at in detail. Multiple lines would be much better than a single one, but the whole file isn't necessary if you want or need to reduce the size.

Attach Database (or other work) may help. Ignore anything about databases as this wouldn't be of course.
Jan 9 '13 #4
dowlingm815
133 100+
Attached is the file, that doesn't contain many records, it has 4470. The Product Description is the field that contains four records for today's run with the last character equal to "á". The fields will be equal to when imported into access:

SCRUBBRUSH SURG W/ CHLORHEX GLUá
SCRUBBRUSH SURG W/ CHLORHEX GLUá
SCRUBBRUSH SURG W/ CHLORHEX GLUá
CABLE PATIENT MONITOR LNCS - LNC-10á

I am truly grateful for your assistance.
Attached Files
File Type: zip Copy of SOData_redo.zip (267.4 KB, 65 views)
Jan 9 '13 #5
NeoPa
32,556 Expert Mod 16PB
While many instances of the text posted were fine, I did find a number of occurrences where the hex character A0 (á) was found. This indicates that the data is already there in your data, and whatever you were looking at it with is simply hiding that from you. I suspect if you find and remove these characters from your data you will find that it all imports properly.

If that works, you are just left with the jobs of finding why the characters are put into the data in the first place and stopping them in future.

Let us know how you get on.
Jan 9 '13 #6
dowlingm815
133 100+
The data is exported from a web-base app. the web users appear to be place a space at the end of the field at times. therefore, when it is exported the value is in the CSV file. honestly, i believe the web developers need to look at their data to populate the export field correctly. would you agree?
Jan 9 '13 #7
NeoPa
32,556 Expert Mod 16PB
DowlingM:
would you agree?
Probably, but I don't have enough information to know for sure. Certainly I would expect the web devs to ensure that non-(ASCII standard) data is not included.
Jan 10 '13 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Jay Chan | last post by:
I am trying to export data from a SQLServer database into a text file using a stored procedure. I want to be able to read it and debug it easily; therefore, I want all the columns to indent nicely....
0
by: SD | last post by:
Hi, a client of mine has parts such as JT220F that have trailing spaces so at first look they seem like duplicates in the ITEM table. Technically they are not because one is JT220F and the other...
1
by: eddiekwang | last post by:
Hello, when I export data from a table to a text file, I get trailing spaces if the data type in char. (This dosen't happen if the data type is varchar). I can get rid of the spaces by using the...
7
by: ITM | last post by:
Can anyone tell me how I can prevent Access adding trailing spaces when I insert a value into a Text column? For example, if I execute the following statement: UPDATE Log SET Log.Title =...
5
by: Tammy | last post by:
I am doing some genealogy research and I have discovered that there is a lot of data available on the web in text format. The problem is that the columns in the files are lined up by spaces. I'd...
5
by: Stan Shankman | last post by:
How do I add trailing spaces within a right-justified textBox? In order to add a trailing space to the text in a right-justified textBox, I use to just append a space to the end of the text...
0
by: Seth | last post by:
First off, my apologies if this is in the wrong newsgroup, but I hope I'm close enough. I'm trying to do some parsing of a CSV file using OleDbConnection, but for some reason, when I populate my...
2
by: rsine | last post by:
I am developing a program that requires me to read a string of data from a text field in a database. Data is parsed from the string based upon a starting position/length. If a piece of data...
17
by: tommy | last post by:
Hi all, I' m adding strings to some fields in my table via Access. The strings sometimes have trailing spaces and I really need to have it that way, but Access truncates trailing spaces. How can...
5
by: brian.j.parker | last post by:
Hey all, I've noticed an obscure little quirk: it appears that if you use a login with trailing spaces on the name, SYSTEM_USER automatically trims those trailing spaces in SQL Server 2000, but not...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.