mirror of
https://github.com/christianvidalwolf-prog/CrazeAnalytix.git
synced 2026-08-03 16:45:24 +02:00
Refine StockBadge design to Top 50 style and move to title row across all views
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
const XLSX = require('xlsx');
|
||||
const path = require('path');
|
||||
|
||||
function inspectForecast(filename, targetSku) {
|
||||
const filePath = path.join(process.cwd(), 'public', filename);
|
||||
const workbook = XLSX.readFile(filePath);
|
||||
const sheetName = workbook.SheetNames[0];
|
||||
const sheet = workbook.Sheets[sheetName];
|
||||
const data = XLSX.utils.sheet_to_json(sheet);
|
||||
|
||||
console.log(`Searching for SKU: ${targetSku} in ${filename}`);
|
||||
const results = data.filter(row =>
|
||||
String(row['SKU'] || row['sku'] || '').includes(targetSku) ||
|
||||
String(row['ASIN'] || row['asin'] || '').includes(targetSku)
|
||||
);
|
||||
|
||||
if (results.length === 0) {
|
||||
console.log('No results found.');
|
||||
} else {
|
||||
results.forEach(r => console.log(JSON.stringify(r, null, 2)));
|
||||
}
|
||||
}
|
||||
|
||||
const targetSku = process.argv[2] || '46234';
|
||||
inspectForecast('fc UK 26.xlsx', targetSku);
|
||||
Reference in New Issue
Block a user