Skip to content

PHP API that can read an Excel file taking in account complex formulas, matrices, graphs, etc

Notifications You must be signed in to change notification settings

thomas-rooty/readXlsx-php-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

XLSX Reader API

XLSX Reader API

Description

This PHP API allows you to read, edit, create and calculate cells from an Excel file sent via POST, it'll return the values you asked for to your app.

Javascript

async function saveFile(fileName, workbook) {
    const xls64 = await workbook.xlsx.writeBuffer({base64: true})
    const blob = new Blob([xls64], {type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'})
    const completeName = fileName + '.xlsx';
    saveAs(blob, fileName)

    let formData = new FormData();
    formData.append('file', blob, completeName);

    let xhttp = new XMLHttpRequest();
    xhttp.open("POST", "http://localhost:5050/upload/readXlsx.php", true);

    xhttp.onreadystatechange = function () {
        if (this.readyState === 4 && this.status === 200) {
            console.log(this.responseText);
        }
    };

    // Send request with data
    xhttp.send(formData);
}

About

PHP API that can read an Excel file taking in account complex formulas, matrices, graphs, etc

Topics

Resources

Stars

Watchers

Forks

Languages