I need help with VBA and a CSV file output

D

DStrong

I am using Excel 2003 in XP Pro.

I am trying to export/saveas one tab from a workbook that contains one tab
and one column of data into a CSV file.

My data is in column A in multiple rows and looks like the following on each
row:
0,123456,0,0,99,0,0,0,0,0,0,0,0,0,5,11/11/2009,0,0,0,0,0,0,


I have everything working fine except for one large issue, excel adds " "
to the begining and end of each cell of data and looks like the following:
"0,123456,0,0,99,0,0,0,0,0,0,0,0,0,5,11/11/2009,0,0,0,0,0,0,"

These quotes are an issue for what this file will be used for. I know that I
can manually remove these later in the CSV file, but I want Excel to output
with out them. My CSV is being entering to a DB for fast entry and I need to
make this a very simple process. For the life of me I cannot get it to work.

I have tried adding a single ' quote to the begining in my vba. I have
formatted as text. I have tried using something recommended to me of CStr in
my code all to no joy. Can anyone help me on this? PLEASE!
 
B

B Lynn B

If you were to simply parse out column A (i.e. use the text to columns
operation), so that each of the comma separated values has its own column,
then save as .csv file type, your resulting .csv file would be ready for
upload to your database.
 

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