diff --git a/data/data.xlsx b/data/data.xlsx index 3d8837a..eefde05 100644 Binary files a/data/data.xlsx and b/data/data.xlsx differ diff --git a/src/index.js b/src/index.js index dd37ff9..7ab977b 100644 --- a/src/index.js +++ b/src/index.js @@ -40,7 +40,7 @@ app.post('/upload', async function (req, res) { let input = req.body.myFile; let wb = XLSX.read(input, { type: 'binary' }); - let xlData = XLSX.utils.sheet_to_json(wb.Sheets['Sheet2']); + let xlData = XLSX.utils.sheet_to_json(wb.Sheets['Sheet1']); let data = xlData.map((row) => ({ productName: row['Product name'], smallTypeName: row.SmallTypeName, productCategory: { productCategoryId: row['CategoryID'], newCategory: row['Category'] }, alert: row.alert, cost: row.cost, qtyStock: row.qtystock, sellPrice: row.sellPrice })) res.send(data)