I have created an Excel workbook using the excel4node library.
var workbook = new excel.Workbook();
var worksheet = workbook.addWorksheet('Sheet 1');
worksheet.cell(1,1).string('Component');
worksheet.cell(1,2).string('Part Name');
worksheet.cell(1,3).string('Value');
I have filled a bunch more cells but I'll keep it short and sweet here as it's not relevant to the question!
I've saved the workbook to my local environment with:
workbook.write(productName + ".xlsx", res);
The name variable is taken from a database. How would I be able to get the user to download this spreadsheet?
If anybody has an idea as to why any help is much appreciated!