If you're talking about Excel Online in Office 365 connecting to on prem data, that is possible with the Gateway if you're using PowerPivot. You can use Power BI to schedule an Excel Workbook refresh from on premises data.

 

If you're talking about on prem Excel Services or Excel Online, you can configure the data connection to refresh on open.

www.000webhost.com