+1 vote
by
I created a form with a field for entering data, in this field I have to enter the product's article. I have an Excel file with all the articles and information on them. How can I display the information from the excel file (all that the user is looking for the article) on the screen (preferably the same table)?
by
Alams Stoyne I agree with you, the customer is stubborn and doesn't want to give up Excel...
by
Storing data in Excel and processing it is a bad idea.
Create a database, transfer there the information from Excel and use it for the output of search, sorting, etc.
by
Alexei Then, in order not to bother with unnecessary libraries, I advise you to translate it into CSV.
And if I were to consider further, I would do this:
Saved in CSV with delimiters
The script went through the file and generated an array of data
Saved the array in JSON
For output and search I would use VueJs for reactive data sorting search

1 Answer

0 votes
by
 
Best answer
If you have a site in php, then create a file in the root of test.pðráta:
spoiler php
header('Access-Control-Allow-Origin: *');

header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename=archive.zip');
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');

echo file_get_contents('https://docs.google.com/spreadsheets/d/1LCPXEorv3x5YYiikpciI0A2YaPNB41Epn-9JKMdW94/export?format=zip'); The link to the export table, of course, replace it with your own! Let's say you have a link to the Google table:
https://docs.google.com/spreadsheets/d/1LCPXEorv3x5YYiikpciI0A2YaPNB41Epn-9JKMdW94/edit
You need to change edit to export?format=zip at the end to make it work:
https://docs.google.com/spreadsheets/d/1LCPXEorv3x5YYiikpciI0A2YaPNB41Epn-9JKMdW94/export?format=zip
If you follow this link, you will see that you are given a zip-archive with html-files inside. If you follow this link, you will see that you are given a zip-archive with html-files inside it. To spar the information, on the site itself, before the closing tag</head> insert: spoiler

Then go to your site, open the console and for test purposes perform: test = await googleTableParse(); If the data object went into the variable, then everything is fine, you can use it.
...