Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I need to read cells values from a worksheet and i am referencing the following piece of code, however i don't get .Items() method.

Code Referred:


Also is there any other way we can read the cell values? Any suggestions/help would be highly appreciated.

Regards, Ketan

share|improve this question

2 Answers 2

I believe it would be:

$VaribleObject = $objWorksheet.Cells.Item(2, 1).Value()

I hope this helps ;)


share|improve this answer
Done using same way..still giving error $excelObj = New-Object -ComObject "Excel.Application" $wrkBook = $excelObj.Workbooks.Open("FILE_PATH") $wrkShtGroup = $wrkBook.Worksheets.Item(4) $wrkShtGroup.Cells.Items(2,2).Value() –  Ketan03 Aug 17 '12 at 11:43
Hi that really strange! I dont really use poweshell meself but I fond this that should help! goto page 378. It goes into detail far more than I could as I dont know what code you might have thats effecting the result! hope it helps –  ali Sharepoint Aug 17 '12 at 12:59
the code iv done is correct, make sure your worksheet is correct? so you have 4 sheets within the workbook and you want to access the fourth? also your accessing row 2, 1 would be the header. the second val is 2 which would be column 2! blogs.msdn.com/b/sriram_reddy1/archive/2012/07/16/… –  ali Sharepoint May 12 at 7:31

Try this

$objWorksheet.Cells.Item(1,2).Value2 = "New Value"
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.