I need to modify strings in two CSV files. I am using Windows XP.
The file names are pi_jobs.csv and pi_offices.csv.
I require two blank spaces between each record, and then two blank rows after the last record.
The files are generated by an Access-based application, and I’ve been able to create the blank rows in the output via the SQL statement (basically, the last field in the query concatenates two sets of Chr(10) and Chr(13) characters, giving me two line feeds and two carriage returns).
However, when I output the files to CSV it includes those carriage returns and line feeds as a separate field in the record, and thus puts a comma before the field, and quotes around the field.
I’ve provided an example below. Note gap between the first and second record. There is a comma and quotation mark at the end of the first record, and a closing quotation mark before the start of the second record:
“An accredited Medical Assisting program where eligible to receive either AAMA or AMT certification; High School Diploma or GED required; Minimum of three years work experience in a medical or related business office; Working knowledge of phlebotomy and administering injections. Desired: Associates Degree.”,”
”
“TBP20113105-82792″,”chicago-edgewater”,”9999999″,”TBP Medical Assistant”
I’ve been very careful with my page formatting here – that is exactly how the line spacing looks. There are three line gaps in that spacing. It should, however, look like this:
“An accredited Medical Assisting program where eligible to receive either AAMA or AMT certification; High School Diploma or GED required; Minimum of three years work experience in a medical or related business office; Working knowledge of phlebotomy and administering injections. Desired: Associates Degree.”
“TBP20113105-82792″,”chicago-edgewater”,”9999999″,”TBP Medical Assistant”
Here is a pure Access solution.
Step 1: Add reference to Microsoft Scripting Runtime library in your database
Step 2: Create a function that will open the table/query and read the records line-by-line and outputs to .csv file
And, this is how your output file should look like: