UNPKG

subhasmitalmg-react-spreadsheet-import

Version:

React spreadsheet import for xlsx and csv files with column matching and validation steps

11 lines (7 loc) 350 B
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); const exceedsMaxRecords = (workSheet, maxRecords) => { const [top, bottom] = workSheet["!ref"]?.split(":").map((position) => parseInt(position.replace(/\D/g, ""), 10)) || []; return bottom - top > maxRecords; }; exports.exceedsMaxRecords = exceedsMaxRecords;