DEV Community

Nagarajan R
Nagarajan R

Posted on

Answer: How to parse Excel (XLS) file in Javascript/HTML5

readExcelFile = async ( file ) =&gt
{

    const fileReader = new FileReader();
    fileReader.readAsArrayBuffer( file );

    fileReader.onload = ( e ) =>
    {
        const bufferArray = e.target.result;

        const wb = XLSX.read( bufferArray, { type: "buffer" } );

        const wsname = wb.SheetNames[ 0 ];

        const ws = wb.Sheets[ wsname ];

        const

Top comments (0)