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();
table.addColumn("id");
table.addColumn("species");
table.addColumn("name");
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
but i want it like this, is it possible? Any suggestions for me? thank you