# Need direction for help with Excel, please!

**URL:** <https://forums.powershell.org/t/need-direction-for-help-with-excel-please/862>\
**Category:** PowerShell Help\
**Created:** [December 31, 2011, 6:30pm UTC](https://forums.powershell.org/t/need-direction-for-help-with-excel-please/862 "2011-12-31T18:30:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![archives](https://avatars.discourse-cdn.com/v4/letter/a/bb73d2/32.png) [@archives](https://forums.powershell.org/u/archives)\
**Post date:** [December 31, 2011, 6:30pm UTC](https://forums.powershell.org/t/need-direction-for-help-with-excel-please/862/1 "2011-12-31T18:30:00Z")

</div>

by TimT at 2013-04-15 15:18:50

> Hi there, this is a NOOB alert. I am fairly new to PS, but used to script quite a bit.  
>   
> If you would please direct me to the forum for Excel. I have a script (see below) that I need help on. After opening the Excel file, a popup will come up asking weather or nto you want to update the file. I do want to, but cannot find a way to automate that. It would occur where line 9 is.  
>   
> Thanks! Any help is greatly appreciated!  
> Tim  
>   
> $excel = new-object -comobject excel.application  
> $Excel.Visible = $False  
> $Excel.DisplayAlerts = $FALSE  
>   
> $excelFiles = Get-ChildItem -Path "\earth\Reviewed Loans" -Include \*.xls, \*.xlsm -Recurse  
> Foreach($file in $excelFiles)  
> {  
> $workbook = $excel.workbooks.open($file.fullname)  
>   
> $workbook.save()  
> $workbook.close()   
> }  
> $excel.quit()

by DonJ at 2013-04-15 15:22:27

> Please see rule #3, above :).  
>   
> Also, rule #1. 🙂 🙂  
>   
> We don’t have a forum for Excel, and it can - as you see - be very complicated to work with. Can you attach a screen shot showing the popup in question? And also, can you identify which line of your script is line 9? The Close() method?

by TimT at 2013-04-15 15:49:48

> Thank you again!  
>   
> Line #9 would be the blank line right above the ‘$workbook.save()’ line.  
>   
> The attached file is a screen shot I get when I run it. It is the same dialog box as if the excel program was showing behind it.  
>   
> I can hit the ‘u’ key each time, but I have over 500 files to process.  
>   
> Again - any help is appreciated.

by DonJ at 2013-04-15 15:52:25

> Ah. Yeah, no way to automate that. Not that I ever found. Look into AutoIt - it’s a scripting language specifically for automating GUI stuff like this.

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:58pm UTC](https://forums.powershell.org/t/need-direction-for-help-with-excel-please/862/2 "2024-05-16T20:58:00Z")

</div>


