Good morning everyone, I am writing to you about a strange problem that is happening to me with a web app that I created for work;
I use the web app to make an inventory of my bars.
DESCRIPTION OF THE WEB APP:
written in html, css, and js, it is nothing more than a graphical interface in which you have to load the data from an excel sheet, this data changes from month to month.
I use the web app to bring the excel sheet to my smartphone and fill it in more easily instead of working directly on the excel sheet from my smartphone (which is not very easy to fill in).
The web app, once the excel file with the data has been loaded, allows you to choose which bar to carry out the inventory on (lounge, crystal, green); once the inventory of the chosen bar has been completed, the file is saved as a .xlsx file. At the same time, other operators can do the same inventory on the other 2 remaining bars. once the 3 inventories are completed (but they can also be 2 or 1) the web app merges the three inventories and brings them together in a single .xlsx file so that I can have them all in a single file.
PROBLEM DESCRIPTION: the problem that is created is the following; the web app works perfectly on android devices, on windows, on mac, but on ios devices it does not load the data from the excel sheet to then perform the inventory.
I can’t understand where the problem is.
LIBRARIES USED in head:
https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
https://cdn.jsdelivr.net/npm /[email protected]/dist/exceljs.min.js https://cdn.jsdelivr.net/npm/[email protected]/dist/FileSaver.min.js https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js https://cdnjs.cloudflare.com/ajax/libs/colresizable/1.6.0/colResizable-1.6.min.js
LIBRARIES USED in body:
https://cdn.sheetjs.com/xlsx-latest/package/dist/shim.min.js
https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js
THESE ARE THE FUNCTIONS THAT DEAL WITH LOADING THE XLSX FILE IN THE WEB APP:
// Function to manage the loading of the Excel file
function handleFile(e) {
const file = e.target.files[0];
if (file) {
originalFileName = file.name;
const reader = new FileReader();
reader.onload = function (e) {
const dataBinary = e.target.result;
const wb = XLSX.read(dataBinary, { type: 'binary' });
processData(wb);
};
reader.readAsBinaryString(file);
}
}
// Function to process the data of the Excel file and convert it to JSON
function processData(workbook) {
const firstSheetName = workbook.SheetNames[0];
const worksheet = workbook.Sheets[firstSheetName];
const jsonData = XLSX.utils.sheet_to_json(worksheet, { defval: "" });
data = jsonData;
renderTable();
}
A thousand thanks