wes517 Posted June 24, 2010 Share Posted June 24, 2010 I've been looking for a way to set row colors in excel, and so far I haven't found it. I have done a bunch of searches in the forums, google and the help file, so if I missed it I must have been searching for the wrong information. Basically I have 2 spreadsheets, one saying all the relevant settings on about 130 computers, and the other has an export of the results of a deployment, and I'm trying to find out what settings are causing the problem. I want to be able to read in the list of results with computer names, and based on the success or fail, highlight that computer's row in the settings spreadsheet red or green so i can keep rerunning this periodically to see how things are going. I have everything figured out except how to highlight the row from autoit. Does anyone know the way to do this, or can at least point me in the right direction? Link to comment Share on other sites More sharing options...
Spiff59 Posted June 24, 2010 Share Posted June 24, 2010 (edited) This allows you to change the background color:$oExcel.Activesheet.Range("A1").Interior.ColorIndex = 3Or this the font color:$oExcel.Activesheet.Range("A1:C5").Font.ColorIndex = 5Edit: Adding Color to Excel 2007 Worksheets by Using the ColorIndex Property(works with Office 2003 also) Edited June 24, 2010 by Spiff59 Link to comment Share on other sites More sharing options...
wes517 Posted June 24, 2010 Author Share Posted June 24, 2010 (edited) Thanks for the help! I came up with this in a function $oExcel.Activesheet.Rows($row).Select $oExcel.Selection.Style = $Style from recording a macro and taking code from the excel UDF (which I'm not sure why I didn't try first...) Edited June 24, 2010 by wes517 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now