When creating CSV file, how to remove newline character from a text and join together.

if (newText.includes('\r\n')) {
                            
            const lines = newText.split('\r\n');

           // Join the array elements without newline characters
            newText = lines.join('');
 }

Leave a comment

Your email address will not be published. Required fields are marked *