From d5242aa7d9d02f87d9090c770e5ed578edbaa81f Mon Sep 17 00:00:00 2001 From: Navan Chauhan Date: Thu, 23 Jan 2025 16:23:31 -0700 Subject: remove newline --- templates/index.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/templates/index.html b/templates/index.html index 3106ecd..46b53e0 100644 --- a/templates/index.html +++ b/templates/index.html @@ -271,7 +271,12 @@ function processData() { const data = document.getElementById('excelData').value; - const rows = data.split('\n').map(row => row.split('\t')); + // const rows = data.split('\n').map(row => row.split('\t')); + const rows = data.split('\n').filter(row => row.trim() !== '').map(row => row.split('\t')); + if (rows.length === 0) { + alert('No data found'); + return; + } // Assuming first row contains headers const headers = rows.shift(); -- cgit v1.2.3