diff options
Diffstat (limited to 'templates/index.html')
-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(); |