Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default removing commas in csv


Hi, my first post!
I have a workbook which I need to change into a comma delimited file s
as to import it into Access (it won't import with the normal xls fil
but it's ALMOST right if I use csv). It works fine until I try t
import memo fields containing a comma, wherein it uses the comma t
create a new cell. What I want to do is to have all the commas remove
from the memo fields. I did find a piece of code which should do thi
but have no idea how to implement it. Any suggestions gratefull
received. Thanks. Ziggy

--
ziggynorto
-----------------------------------------------------------------------
ziggynorton's Profile: http://www.excelforum.com/member.php...fo&userid=3521
View this thread: http://www.excelforum.com/showthread.php?threadid=55175

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default removing commas in csv

ziggynorton,
You should be able to import/link the XL file directly in Access, assuming
it has a table structure. The fact you have commas in a text field should
not matter.
Even so, with the CSV file, as long as your memo field is surrounded by
quotes (which it would be if generated by XL), again the internal commas
should not matter, as long as you tell Access that the Text Qualifier is ""
(on the first step of the Access Import Wizard click Advanced..).

Why will the XL file not import directly ?

NickHK

"ziggynorton"
wrote in message
...

Hi, my first post!
I have a workbook which I need to change into a comma delimited file so
as to import it into Access (it won't import with the normal xls file
but it's ALMOST right if I use csv). It works fine until I try to
import memo fields containing a comma, wherein it uses the comma to
create a new cell. What I want to do is to have all the commas removed
from the memo fields. I did find a piece of code which should do this
but have no idea how to implement it. Any suggestions gratefully
received. Thanks. Ziggy.


--
ziggynorton
------------------------------------------------------------------------
ziggynorton's Profile:

http://www.excelforum.com/member.php...o&userid=35210
View this thread: http://www.excelforum.com/showthread...hreadid=551751



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 400
Default removing commas in csv

As far as know, it is not possible to import into MEMO (or more
appropriately IMAGE) columns (which contain Byte arrays) in Access using SQL
(what Import will be using). I have used ADO and its AppendChunk method to
retrieve Byte() arrays and then the Update method to write to the table.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default removing commas in csv


I've been importing Excel spreadsheets directly into Access just usin
the import feature that Access has. However, for some reason, th
latest batch of spreadsheets wouldn't import certain fields, jus
creating errors. However, I did find that the best way of exportin
them is using the tab delimiter rather than the comma. As Nic
mentioned, csv SHOULD surround the memo fields with quotes, but thi
only happened MOST of the time, a few seemed to slip through the net
So, the best method, and the one that works, is exporting text with ta
delimiting, which imports directly. This is a link to an article whic
discusses the subject but unfortunately, my skills don't allow me t
put this into practice (or to be honest, understand where to put th
code!)
http://support.sas.com/sassamples/qu...adelimited.htm

--
ziggynorto
-----------------------------------------------------------------------
ziggynorton's Profile: http://www.excelforum.com/member.php...fo&userid=3521
View this thread: http://www.excelforum.com/showthread.php?threadid=55175

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default removing commas in csv

ziggynorton,
Post a sample of the records in XL that are causing you trouble.

NickHK

"ziggynorton"
wrote in message
...

I've been importing Excel spreadsheets directly into Access just using
the import feature that Access has. However, for some reason, the
latest batch of spreadsheets wouldn't import certain fields, just
creating errors. However, I did find that the best way of exporting
them is using the tab delimiter rather than the comma. As Nick
mentioned, csv SHOULD surround the memo fields with quotes, but this
only happened MOST of the time, a few seemed to slip through the net.
So, the best method, and the one that works, is exporting text with tab
delimiting, which imports directly. This is a link to an article which
discusses the subject but unfortunately, my skills don't allow me to
put this into practice (or to be honest, understand where to put the
code!):
http://support.sas.com/sassamples/qu...delimited.html


--
ziggynorton
------------------------------------------------------------------------
ziggynorton's Profile:

http://www.excelforum.com/member.php...o&userid=35210
View this thread: http://www.excelforum.com/showthread...hreadid=551751



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
removing commas from numbers etc. Excel ??[_2_] Excel Worksheet Functions 2 August 10th 07 09:26 AM
Removing patterns without removing gridlines pennyb9 Excel Discussion (Misc queries) 1 July 11th 07 02:43 AM
removing commas from a string TheIrishThug[_3_] Excel Programming 4 December 18th 05 05:50 PM
Removing commas Ernie Sersen Excel Worksheet Functions 1 December 13th 04 05:15 PM
Removing commas rcmiv Excel Programming 4 October 18th 04 01:37 PM


All times are GMT +1. The time now is 10:18 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"