Welcome › Forums › General PowerShell Q&A › Respond to Excel prompts programatically
This topic contains 2 replies, has 2 voices, and was last updated by
I have a .xlsm file and I'm trying to convert it to a xlsx with the code below:
$objExcel = New-Object -comobject excel.application
$objExcel.Visible = $False
$doc = $objExcel.WorkBooks.Open($path)
$objExcel = $null
The only problem is that excel prompts me with the GUI every time saying "The following features cannot be saved in macro-free workbooks...". I don't care though.
How can I pipe a response to the prompt, as I would if there was a y/n confirmation in a cli command.
i haven't tested, but you could try piping it to out-null
You must be logged in to reply to this topic.