473,385 Members | 1,942 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,385 software developers and data experts.

Getting rid of Carriage Return Characters after export

I'm constantly required to export data from Access to Excel for formatting and find it extremely difficult to remove the Chr(10) and Chr(13) codes from the imported data. A search and replace in Excel doesn't recognize the characters and I can find no 'quick' way of fixing this problem, is there a way of making sure the characters don't come across during an export (they appear as boxes in Excel) or is there code that I can use in Excel to search for and remove the carriage return characters?
Aug 1 '06 #1
2 12884
PEB
1,418 Expert 1GB
If in your data in Access you have those symbols you can use the function:
Replace(My_field, chr(13), "") and everywhere in the field CHr(13) will be replaced with ""

But maybe this problem appears while exporting data to Excel? How do you export your data to Excel? Because when I use directly xls format for Excel 5-7 I don't have any problems! It's like in Access!
Sep 3 '06 #2
jennyc
1
Thanks, great tip - both of you, for telling me what the character numbers were that were replacing those carriage returns in the Access memo field, and for suggesting the replace() function.

I used the following nested replace in my query, it even worked around the results of my iif() function - to replace the multi-line characters with a "," and " " for a much smoother export.

eg: A query to pull the correct address from a record now contains this:
Mailing address: Replace(Replace(IIf[Address] Is Null,[address2],[address]),Chr(13),","),Chr(10)," ")

There are probably a number of permutations that would have worked in this situation. (like putting the "replace" within the iif - but I'd have had to do it for both fields then)! So thanks for the tip.
Sep 26 '06 #3

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

Similar topics

0
by: Alin Popovici | last post by:
Hi! I have this problem. I am sending as a parameter for a webmethod a string containing '\r\n' sequences. For some reason, when I debug my webmethod, the paramter is received with the carriage...
8
by: Steven | last post by:
i need to force a carriage return with a textarea field at X number of characters. anybody know how to do this? tks
2
by: Alin Popovici | last post by:
Hi! I have this problem. I am sending as a parameter for a webmethod a string containing '\r\n' sequences. For some reason, when I debug my webmethod, the paramter is received with the carriage...
6
by: Laura D | last post by:
How can I identify a carriage return in C++? \r, \f, \0, \n, \t does not work. I have also tried !isprint(ch), iscntrl(ch), isspace(ch), etc....with no luck! I even poked around in the MSDN and...
2
by: Matt Mercer | last post by:
Hi all, I am having a frustration problem, and I have read about 25 newsgroup postings that do not have a satisfying answer :) The problem appears to be common where carriage returns are lost...
0
by: J.Marsch | last post by:
I am having a problem in which ASP.Net web services are corrupting my data. I know that my problem is related to the standard way of encoding carriage return linefeeds, so I need to figure out how...
6
by: no_spam_for_gman | last post by:
Hi, I have been using the db2 export function for quite sometimes. Everytime I want to use it I have to remove every carriage return from my SQL statement and have it all on one line as shown in...
2
by: Ellen | last post by:
Hi All - I have some data that I export from Access to a pipe-delimited text file. Unfortunately, the text file always has a carriage return symbol at the end. I need to export this file...
2
by: Bobby | last post by:
Hi I'm trying to export some data from an Access table to Sage Line 50 using VBA. It works fine, except that very occasionally one of the fields contains a carriage return. If I step through my...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: 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...

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.