![]() |
I need help with VBA and a CSV file output
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! -- Thanks, David |
I need help with VBA and a CSV file output
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. "DStrong" wrote: 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! -- Thanks, David |
All times are GMT +1. The time now is 01:35 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com