Newsgroups: microsoft.public.windows.powershell
From: dlisterjr <dliste...@discussions.microsoft.com>
Date: Tue, 1 Apr 2008 19:06:02 -0700
Local: Tues, Apr 1 2008 10:06 pm
Subject: Re: Excel Row Format
When I record the macro there is a find method, but that would only run once.
Recording a macro would work if I was trying to do the action once, but I need to check each row of data for the string. "Oisin (x0n) Grehan [MVP]" wrote: > On Apr 1, 3:48 pm, dlisterjr <dliste...@discussions.microsoft.com>
> wrote: > > The problem is that I need to search each row for data and then format that > > row base on if the data exist. The macro really didn't help with that. > > "Oisin (x0n) Grehan [MVP]" wrote: > > > On Apr 1, 10:27 am, dlisterjr <dliste...@discussions.microsoft.com> > > > Hi, > > > Yes, this should be possible in PowerShell - I don't have the facility > > > $excel = new-object -com excel.application > > > ..and should end with: > > > $excel.Quit() > > > If you're still stuck on this later, drop a note back here and I'll > > > - Oisin- Hide quoted text - > > - Show quoted text - > I'm not sure I understand what you mean when you say "the macro didn't > First, open a sample spreadsheet in Excel, then: > 1) Start recording a Macro > 2) CTRL+F search for your value > 3) Stop recording the Macro > 4) Examine the VBA code that was generated for searching the Excel > 5) Adapt for PowerShell. > Now, repeat the same actions for selecting a row in your spreadsheet > So now, you know which properties and methods to call on the Excel > Additionally, PowerShell lets you examine methods on any object by > ps> $excel = new-object -com excel.application > TypeName: Microsoft.Office.Interop.Excel.ApplicationClass > Name MemberType Definition > Nobody said it would be easy! :-) If you're still completely confused > - Oisin You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||