diff options
author | Navan Chauhan <navanchauhan@gmail.com> | 2025-01-23 16:23:31 -0700 |
---|---|---|
committer | Navan Chauhan <navanchauhan@gmail.com> | 2025-01-23 16:23:31 -0700 |
commit | d5242aa7d9d02f87d9090c770e5ed578edbaa81f (patch) | |
tree | 2af6259aebe3d03b3e0051c816932f66b1c5bad1 | |
parent | b6238c2a6ce28a0594138179b74972392b7da8ff (diff) |
remove newline
-rw-r--r-- | templates/index.html | 7 |
1 files changed, 6 insertions, 1 deletions
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(); |