Add Column on csv file

I want to save data in tabular form and want to save it in excel (csv) form, I have checked references and also tried examples from the internet, there are no errors, but when I addColumn (title) no new column is formed besides the previous column.

here’s an example that I run, and the result

Table table;

void setup() {

  table = new Table();
  TableRow newRow = table.addRow();
  newRow.setInt("id", table.getRowCount() - 1);
  newRow.setString("species", "Panthera leo");
  newRow.setString("name", "Lion");
  saveTable(table, "data/new.csv");

// Sketch saves the following to a file called "new.csv":
// id,species,name
// 0,Panthera leo,Lion

nanya before

but i want it like this, is it possible? Any suggestions for me? thank you
pengen gini

1 Like

The problem here is Excel
You can’t use “open” here
Instead use “import data…” or something


It works here with a couple of different versions of Excel:


Are you seeing an excel icon?


I may be related to regional settings:

It just did a quick search…


1 Like

Hello @glv , thank you for replying. The data icon that I saved looks like this

what do you mean regional setting??, setting on excel??, hmm i’ll read that link. Thank you…

problem is excel? @Chrisir, actually i don’t want to import data but i want to save data.
Thank you @Chrisir for replying …

As I wrote: imho the text file is correct so it’s not a Problem how you write the data

Instead it’s a Problem of how you load the data in Excel; please import it

halo @Chrisir and @glv , both of u are right. I’ve tried with link above that is share by @glv.
Now it’s clear thank you so much