Skip to content
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

Appending while writing to file doesn't create a new row #99

Open
AlexPerathoner opened this issue Sep 12, 2019 · 3 comments
Open

Appending while writing to file doesn't create a new row #99

AlexPerathoner opened this issue Sep 12, 2019 · 3 comments

Comments

@AlexPerathoner
Copy link

Just as the title says, when I'm writing to a file which is using a stream with the append argument set to true, the CSVWriter is writing the first row on the last already written row.
Then it works properly.

@akshit5230
Copy link

I did a workaround by writing
try! csv.write(row: [""])
before appending the actual row. Then it creates a new row. 😁

@zant
Copy link

zant commented Mar 23, 2020

+1

@akshit5230 thanks for the tip though

@dipcse07
Copy link

dipcse07 commented Feb 8, 2023

I did a workaround by writing try! csv.write(row: [""]) before appending the actual row. Then it creates a new row. 😁

@yaslab.. In my case When i append to an existing csv created by another library that worked fine.. but when i created a new csv using this library and then tried to append.... i had the same issue and fixed as @akshit5230 did but wondering what is the actual issue so that we can fix it properly and we can use it without any kind of issue.

私の場合、別のライブラリによって作成された既存のcsvに追加すると、正常に機能しました..しかし、このライブラリを使用して新しいcsvを作成し、追加しようとすると同じ問題が発生しました。 @akshit5230 が行ったように修正されましたが、適切に修正して問題なく使用できるように、実際の問題は何なのか疑問に思っています。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants