How can I automate the process of Magento 2 data to excel ? Anytime openning the excel the data should be updated, thank you
So you need two functionalities
Magento can't export to XLS out of the box in any version. Open source and Adobe Commerce offer the ability to export to CSV only.
Regarding periodic export, which will update one given file, in this case, you need to use the Commerce version. Open source does not offer the option of periodic export.
So this is a brief overview of the Magento native functionality.
If I have Magento Commerce, I can imagine some custom functionality - a custom converter to XLS. In the case of Magento Open Source, you will also need a customization for periodic export because it is not part of the Open source edition.
But in real life, I would recommend solving it with some third party module. Nobody wants to reinvent the wheel :).
For example, https://firebearstudio.com/the-improved-import.html should fulfil the requirements, or Amasty released their solution for exporting products https://amasty.com/import-and-export-for-magento-2.html.