Do you have to save the modified excel file when php is imported into excel?

at present, we need to make a requirement that php handles the imported excel data. In the process, must the excel file be saved first, and then read this file, and then manipulate the data? Can you directly manipulate the data after uploading and omit the save step

Mar.23,2021

not necessarily, it can also be operated in memory. Its essence is to read the file stream, which is temporarily stored in memory, and the program will be released after running. I'll just write an example here:

$str=file_get_contents("xxx.txt");
echo $str;

this is to read the content from the file and save it in the string variable (the same is true for), excel in memory, you can look for third-party libraries such as PHPExcel,. Anyway, there are many more, the reason is the same.

you can join a group to learn and communicate: 630418030

Menu