Update data in the same excel file for every 5 minutes

Hi,

I want to download excel file for every 5 minutes. How to code the php script to update the existing excel file with new data from database for every 5 minutes? Which means that i only have one excel file with updates data from database for each 5 minutes. I’m using phpExcel library.

Thank you in advance

Manually? Explain this a bit more.

I already have a code that download the excel file. Then i put the excel file in task scheduler to auto run every 5 minutes. Then in one folder, i only want only one excel file with the same but updated data for every 5 minutes.

  • and what did you try so far?
  • how does the content from the file look like?
  • how does the database look like?

and what did you try so far?
i can successfully download the excel file but i don’t know on the update part.

how does the content from the file look like?
test

how does the database look like?
db

just run the script in your task sheduler. if that’s cron, like

*/5 * * * * php -f excel.php > /dev/null 2>&1

https://wiki.ubuntuusers.de/Cron/

Oh yes, i understand that we must put in task scheduler. But the excel file will become duplicate isn’t? I only want one excel file with updated data. The way to code it, i don’t know because iam new learner in php

Since the server cannot really push a file to the client, think about the issues with malware this would create, I would schedule this from your computer to pull in the current file that is on the server. Then you are just updating the file on the server rather than updating the file on the server and pulling it in.

if you store each file under the same path there could not be any duplicates.

Sponsor our Newsletter | Privacy Policy | Terms of Service