asimlqt / php-google-spreadsheet-client

A PHP library for accessing and manipulating Google Spreadsheets
Other
543 stars 154 forks source link

editCell not support NEWLINE "\n" character #78

Closed francescobianco closed 8 years ago

francescobianco commented 9 years ago

this is a strange problem!!!

$feedCell->editCell(1,1,"Hello\nWorld");

in the Spreadsheet linebreak are stripped WHY????

ptrsec commented 9 years ago

I wanted to use new lines so I found an workaround for this, use:

="hello"&CHAR(10)&"world"

But be careful when sending the data, make sure you escape the double quotes. See issue:

https://github.com/asimlqt/php-google-spreadsheet-client/issues/82

Dartui commented 8 years ago

You can use CONCATENATE function, for example:

$feedCell->editCell(1,1,"=CONCATENATE('Hello'; CHAR(10); 'World')");
asimlqt commented 8 years ago

This has been resolved in the latest version. You can use "\n" when editing the cell content.