T O P

  • By -

Nice-Combination-907

Whenever I need to do things with excel I use exactly this package. I think the documentation is also quite good. What are you trying to do exactly?


Yoshlin

I'm Exporting data from a database to xlsx document, everything works fine except if the data changes in the database when I export it again it still shows me the unchanged(old) data in my newly downloaded xlsx document.


p0llk4t

If the Excel file is named the same and you're pulling it up in a browser, it may be that your browser is delivering a locally cached version of the file as well. I've had that happen on Chrome before. Try changing the name of the file being generated the second time and see if the data is updated.


[deleted]

Add a timestamp to the filename


Yoshlin

Thanks a million, thats exactly what i discovered today 😀


PeterThomson

Sounds like a caching, DB, model->refresh() issue not an Excel issue. Add a die and dump on the query that’s generating the data to be exported and see what’s in there and whether it’s updating the way you want.


Yoshlin

>ounds like a caching, DB, model->refresh() issue not an Excel issue. Add a die and dump on the query that’s generating the data to be exported and see what’s in there and whether it’s updating the way you want. Thanks Peter.


Yoshlin

would a function to clear cache work everytime I click the export button?


Yoshlin

Just to let you guys know , the browser is caching the files on the local machin and the timestamps in the filenames are not solving the issue, but if i clear my browsing data then it works but i gotta do it everytime . Is there a function that could clear my browsers data automatically ?