Reputation: 3045
How can I remove the CRLF in Given String to resolve issue?
As all of us know that Javascript is not support multiple line String. e.g.
var str = "Hello
I am Ashwin";
It is Not allowed. But we should write like this.
var str = "Hello" + " I am Ashwin";
Or var str = "Hello \ I am Ashwin";
data.setValue(27, 2, 'This is my line with break here
');
In above Javascript I have error at Runtime "SyntaxError: Unexpected token ILLEGAL" I want to prepare the data dynemic with replacing the existing CRLF in given string to it will become like this.
data.setValue(27, 2, 'Team Effectiveness in Primary Care Networks in Alberta');
Thanks In Advance for Great Javascript Solution
Upvotes: 0
Views: 123
Reputation: 13539
The only one way at the moment is yo add \ at the end of the row:
data.setValue(27, 2, 'This is my line with break here\
');
Upvotes: 0