Allow large activity Excel imports (40k+ rows) with bigger chunks and caches.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -319,16 +319,8 @@ export async function previewExcel(
|
||||
const missingRequired = required.some((key) => !mapped.has(key));
|
||||
const unrecognized = columns.some((col) => !suggested[col.header]);
|
||||
|
||||
let rowCount = 0;
|
||||
sheet.eachRow((row, rowNumber) => {
|
||||
if (rowNumber === 1) return;
|
||||
let any = false;
|
||||
row.eachCell((cell) => {
|
||||
if (any) return;
|
||||
if (cellStr(cell.value)) any = true;
|
||||
});
|
||||
if (any) rowCount += 1;
|
||||
});
|
||||
// برای فایلهای خیلی بزرگ (دهها هزار ردیف) پیمایش کامل کند است؛ rowCount شیت کافی است
|
||||
const rowCount = Math.max(0, (sheet.actualRowCount || sheet.rowCount || 1) - 1);
|
||||
|
||||
return {
|
||||
columns,
|
||||
|
||||
Reference in New Issue
Block a user