ignoring format/control codes exporting data from access to excel

H

Horsecat

Doug - I got to reading the posting done on another query by Ken Snell (MVP)
and played around with that and got the following to work:

Production: Replace([tblNewProducts.ProdProcedures],Chr(13) &
Chr(10),"",1,-1,1)

NewFieldName: Replace([tablename.oldfieldname],Chr(13) & Chr(10),â€â€,1,-1,1)

and of course the table field is blank

that posting was re: Export Data into Excel Spreadsheet - hard line break
symbols! dated 8/10/07

thanks
Delma
 
H

Horsecat

now that I have the query working - I still have the field cut off when I
export it to excel - any ideas?

Douglas J. Steele said:
Create a query that replaces the Carriage Return/Line Feed Access uses with
just a Line Feed (which is all Excel requires), and export the query rather
than the table:

Replace([MyField], Chr(13) & Chr(10), Chr(10))

If that doesn't work, try replacing the Carriage Return/Line Feed with a
space:

Replace([MyField], Chr(13) & Chr(10), " ")

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Horsecat said:
I am trying to export data from access that has control returns in the
basic
format of the field. When data is exported to excel (or imported by query
in
excel) these codes cause the data to be spread out and sometimes cut off.
How can I run a query in access and export that data completely ingnoring
the
control returns. Or as an alternative, how can I copy fields from access
and
paste them into excell and have the control characters ingnored. Or run a
query in excel that imports data ingnoring the codes?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top