-
Notifications
You must be signed in to change notification settings - Fork 214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to escape a single qoute in a row #446
Comments
Temporarily I'm stripping the single quotes const transform = row => ({
TaskName: row.TaskName.replace("'", ""),
});
const ws = createWriteStream('transform.csv');
fastcsv.writeToStream(ws, tasksList, { headers: headers, alwaysWriteHeaders: true, transform: transform })
.on('error', (err) => rej(err))
.on('finish', () => res()); |
I have the same problem with this case : fs.createReadStream(_importFile as string)
.pipe(csv.parse())
.on('error', error => reject(error))
.on('data', row => {
resp.push(row);
})
.on('end', (rowCount: number) => {
this.logProvider.info(`Parsed ${rowCount} rows`);
resolve(resp);
}); Do you have any solution please ? |
@piobrien fixed in |
How about double quotes?
The column that has double quotes is quoted, but the column with single quotes is not quoted |
@doug-martin Could you help to check if this behaviour is correct for double quotes? |
Hi, @doug-martin @piobrien could you kindly look into this? Our tests are failing because of this change for single quote that did not change for double quote. |
@mabelleeyanhwa sorry I didn't see this notification until this morning...I'll try to take a look today. |
@doug-martin its okay, no worries! Thank you for maintaining this package 🍡 |
Using Fast-CSV to write a .csv for importing by a SSIS job but it's having issues with apostrophe/single quote in the row.
For example fast-csv writes the row like this: "The quick' brown fox" which SSIS isn't liking, it expects the line to not have the surrounding quotes: The quick' brown fox
Can this be achieved using a transform on a row?
It seems only the contents of the row can be altered using a transform and not the quoting.
The text was updated successfully, but these errors were encountered: