Message Boards Message Boards

0
|
4335 Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:

How to Add Write Append data line in CSV files?

Hi, I need to add extra lines in CSV files, but without "BRACES {}" in the second line. I'd like to maintain the same format as first line given by "Export[]" command. Thanks in advance, Gustavo

Attachments:
POSTED BY: Gustavo Dacanal

Gustavo,

This should do the trick. Create a string in CSV format and write the string to the file:

Export["output.csv", data1];
str = OpenAppend["output.csv"];
WriteString[str, ExportString[data2, "CSV"]];
Close[str];

Regards,

Neil

POSTED BY: Neil Singer
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract