Today I was trying to install office 2016 on SharePoint 2016 server and got below message.
Is it possible to install both on the same server?
I dont think, office go well with SharePoint on same server because they have conflicting binaries and SharePoint is also from office family.
We always recommend do not install Office on SharePoint server, rather install it on client machine or create another VM and install it there.
100% ACK to Waqas recommendation: Do not install Office on a productive SharePoint-Server.
But: We had the same problem as you when installing Developer-VMs. They need Office to test their work. Microsoft has two installer-modes for Office-Applications: MSI and Click-to-Run.
You cannot install a Click-to-Run Office on a SharePoint-machine as SharePoint is always a MSI-Installer. We were not able to get an MSI-Installer for Office2016. So we had to install Office2013 with MSI-Installer.