UNPKG

subhasmitalmg-react-spreadsheet-import

Version:

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

7 lines (5 loc) 254 B
const exceedsMaxRecords = (workSheet, maxRecords) => { const [top, bottom] = workSheet["!ref"]?.split(":").map((position) => parseInt(position.replace(/\D/g, ""), 10)) || []; return bottom - top > maxRecords; }; export { exceedsMaxRecords };