No internet required on the target PC during installation.
To install on an offline machine, you need a slightly different XML file (or you can modify the existing one). Create a new file named config-install.xml : microsoft office 365 offline installer
Microsoft no longer provides a single-click “offline installer” file for Office 365 (Microsoft 365 Apps for enterprise) directly on the download page for consumers. Instead, you must use the Office Deployment Tool (ODT) to create your own offline source. No internet required on the target PC during installation