All Microsoft Office editions prior Office 2010 have a bug:
http://support.microsoft.com/kb/320369/
therefore you should change your locale to United States.
--
WBR, Vadims Podans
MVP: PowerShell
PowerShell blog -
www.sysadmins.lv
"TPGBrennan" <TPGBrennan@xxxxxx> rakstīja ziņojumā
"news:F54768B6-19F2-4EDC-AAB2-85E2103FDDDD@xxxxxx"...
> I have read through the previous posts on this forum for opening excel; I
> have searched TechNet and read the various articles; I have the MS Windows
> PowerShell Scripting Guide and nothing works.
>
> I am trying to open an existing Excel worksheet; the file exists and is
> accessible to me.
>
> This line of code returns the following error:
> PS C:\> $b = $xl.workbooks.open($file1)
> Exception calling "Open" with "1" argument(s): "Old format or invalid type
> library. (Exception from HRESULT: 0x80028018
> (TYPE_E_INVDATAREAD))"
> At line:1 char:24
> + $b = $xl.workbooks.open( <<<< $file1)
>
> This line of code, which looks remarkably similiar, returns a different
> error:
> $workbook=$objexcel.workbooks.open($file1)
> You cannot call a method on a null-valued expressio
> At C:\test4.ps1:4 char:35
> + $workbook=$objexcel.workbooks.open( <<<< $file1)
>
> Both were preceded by a definition of $file1 and the new-object
> excel.application command. Is it possible to open an Excel 2003 worksheet
> in
> Powershell 1?