How support multi-lines in csv-files.(csvSave)


#1

it user to work

Why 'store... !csvLine' inserts double quotes no matter what?
I can’t see now.
Here’s an image,


Everything is in one line. …need the multi line. How ?


#2

But what is wrong? Double quotes are normal in the CSV format, or?

"AAA","BBB", "CCC" and AAA,BBB, CCC are both valid CSV files.


#3

Ah, if you need multi-line, you need to do a csvSave after you are done with adding info to each line:

  • store | AAA | !csvLine
  • csvSave | test
  • store | BBB| !csvLine
  • csvSave | test

The result is now:

AAA
BBB

What you do is:

  • store | AAA | !csvLine
  • store | BBB| !csvLine
  • csvSave | test

The result is now:
AAA, BBB


#4

Do not consider abandoned quotation marks as errors

the new line is missing (im bug:clrf="\r\n" and !only"\n":sorry)

How do you build chains from csvs?
step1: csvRead many lines and uses !col1,!col2 ->ok
step2: csvSave write one lines -> wrong
setp3: next csvRead 1 line and uses !col34,!col45,etc -> not programmable (not scriptable)

thank you for dealing with the problem


#5

Your “step2” (writing multiline CSV) works fine for me:

csv

My macro:

{
  "Name": "csv",
  "CreationDate": "2019-2-27",
  "Commands": [
    {
      "Command": "store",
      "Target": "111 \\n 222",
      "Value": "!csvline"
    },
    {
      "Command": "store",
      "Target": "333",
      "Value": "!csvline"
    },
    {
      "Command": "csvSave",
      "Target": "newlinetest",
      "Value": ""
    },
    {
      "Command": "store",
      "Target": "aaa \\n bbb",
      "Value": "!csvline"
    },
    {
      "Command": "store",
      "Target": "ccc",
      "Value": "!csvline"
    },
    {
      "Command": "csvSave",
      "Target": "newlinetest",
      "Value": ""
    }
  ]
}

#6

You mean your CSV has 34 columns?


#7

Thank you for the example.
Yes, I see there is x0a.
The notepad is a wrong, fake display tool.
Yes i should have used the eye. I’m sorry

I understand that the Kantu only supports the x0a and the EOL is not able to handle it depending on the operating system

thanks for everything