Tuesday, January 27, 2009

error with ms excel and powershell 0x800A03EC

Searched for answer and found other people who had the issue but no answer.
Answer for me was I needed to use qoutes, I guess that way powershell does not send a blog but just the qouted string.

here are more details.



$strextensionattribute1 = $objUser.extensionattribute1
$strextensionattribute12 = $objUser.extensionattribute12
$strextensionattribute13 = $objUser.extensionattribute13
$strextensionattribute14 = $objUser.extensionattribute14






Exception setting "Item": "Exception from HRESULT: 0x800A03EC"
At C:\code\ps-examples\list-proxy-search-samaccountname.ps1:55 char:15
+ $c.Cells.Item <<<< ($strExcelRow,6) = $strextensionattribute1
Exception setting "Item": "Exception from HRESULT: 0x800A03EC"
At C:\code\ps-examples\list-proxy-search-samaccountname.ps1:56 char:15
+ $c.Cells.Item <<<< ($strExcelRow,7) = $strextensionattribute12
Exception setting "Item": "Exception from HRESULT: 0x800A03EC"
At C:\code\ps-examples\list-proxy-search-samaccountname.ps1:57 char:15
+ $c.Cells.Item <<<< ($strExcelRow,8) = $strextensionattribute13
Exception setting "Item": "Exception from HRESULT: 0x800A03EC"
At C:\code\ps-examples\list-proxy-search-samaccountname.ps1:58 char:15
+ $c.Cells.Item <<<< ($strExcelRow,9) = $strextensionattribute14


answer was to use qoutes , I guess that way it gets passed as a string rather then a blob?"
$c.Cells.Item($strExcelRow,6) = "$strextensionattribute1"
$c.Cells.Item($strExcelRow,7) = "$strextensionattribute12"
$c.Cells.Item($strExcelRow,8) = "$strextensionattribute13"
$c.Cells.Item($strExcelRow,9) = "$strextensionattribute14"

2 comments:

Alexis said...

I worked with MS Excel yesterday.After I reopened my file and it was empty.I entered in the net and started finding tool.Fortunately I was lucky-corrupt .xlsx.Program helped me in seconds and absolutely free.Besides I saw how tool keep your work in Microsoft Excel workbook and you do not have other copies of this file.

Anonymous said...

@alexis- Great! There are some tools that files will not be recovered anymore.


windows help