Excel 2013

At work I have Excel 2010 and I use the following code which works fine

Add-Type -AssemblyName Microsoft.Office.Interop.Excel
$excel = New-Object -ComObject Excel.Application
$excel.Visible = $true
$workbook = $excel.Workbooks.add()
$wrksht = $workbook.Worksheets.Item("Sheet1")
$wrksht.Name = "Hello"

The same code in Excel 2013 only opens excel and gives me 1 sheet and does not rename sheet1 like in Excel 2010

I’ve just tested your code using Excel 2013 and the rename worked for me

Thanks for testing my code.

Hey Wilfredo,

+1 for it working okay, just tried in on my system with O2K13 and it works good.

Do you have any autoload macros configured for excel, or any additional security settings?
Maybe an idea to also try with a clean profile. Trying creating a new user local user on your system, login with that, and try it (you might need to run excel once before to get rid of all the first start stuff)