Ali Usmaan Ali Usmaan - 5 months ago 53
AngularJS Question

how can we change bytearray in a file(.xlsx or any) in angularjs

I am getting a bytearray as response from my API which is converted from .xlsx file. Now I need to open/download this bytearray(after converting to its previous file extension) in browser. help me how can I do that? I'm helpless.


You can try to read data in browser, client side with readAsArrayBuffer more docs on mozilla website .

But I am not sure you'll be able to parse the contents of .xlsx in plain JS, here's example of library which does that: which is

XLSX / XLSM / XLSB / XLS / SpreadsheetML (Excel Spreadsheet) / ODS parser and writer