Scripting Blog

A place to learn about PowerShell and share stories of automation

Hey, Scripting Guy! Quick-Hits Friday: The Scripting Guys Respond to a Bunch of Questions (01/16/09)

How Do I Set Process Affinity?   Hey, Scripting Guy! I have this application that I would like to set process affinity for. I know I can use Task Manager, right-click the process, and choose to set affinity, but I would like to be able to do this from a script. Can this be done? I asked a newsgroup on the Internet, and someone said ...

Hey, Scripting Guy! How Can I Modify the Footers of an Office Excel Spreadsheet?

Hey, Scripting Guy! I have a simple question for you: How can I modify the footers in an Office Excel spreadsheet?- MN Hi MN, I have a simple answer for you as well. You assign a value to the appropriate footer property of the pagesetup object. If you would prefer a longer answer, read on. Today, we have a script called CreateExcelFooter....

Hey, Scripting Guy! How Do I Center Contents of a Column in Office Excel?

Hey, Scripting Guy! When I add data to an Office Excel spreadsheet, it always seems to put stuff on the right side of the column. I would like to know how to center the contents of a column. I do not think it should be that hard, but I just cannot figure it out. - LK Hi LK, Did you try Open Sesame? I can certainly sympathize with you. It can...

Hey, Scripting Guy! How Do I Run an Office Excel Macro on Multiple Workbooks?

Hey, Scripting Guy! I don't know about you, but I love Microsoft Office Excel macros. Come Valentine's Day, my computer gets a card. Office Excel macros save me so much time, it is just unbelievable. There is just one problem, and that is that I have to open Office Excel and manually run the macro. While this is not normally a problem, it ...

Hey, Scripting Guy! How Can I Add a Function to an Office Excel Spreadsheet?

Hey, Scripting Guy! I need to add some data to an Excel spreadsheet. After I have done that, I would like to add a function to the bottom that will add up all the information in the columns above that. I have seen examples of plugging data into cells, but I do not know how many rows of data I will have. Also, I am not sure how to add a ...