The Carbon Powershell module includes a cmdlet Test-ZipFilethat tells you whether it is a zip file or not.
If you cannot use this module, you can see the file header . This is a bit ugly (short time), but works:
$contents = [string](get-content -raw -Encoding Unknown -path $filepath).ToCharArray();
[convert]::tostring([convert]::toint32($contents[0]),16);
The output 4b50for the file, which, as you know, is a ZIP file that corresponds to the first two bytes of the signature, was canceled.
In the longer term, get the provider to fix their system to provide additional file information. Especially if you need them.
Excel (2007+) ZIP , , - , .xlsx .zip, ZIP - .