Re: VBScript and Out Put to Excel Worksheet

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Thanks, I'll give them a try.

Mike

--


---------------------------------------------------------------------
"Are you still wasting your time with spam?...
There is a solution!"

Protected by GIANT Company's Spam Inspector
The most powerful anti-spam software available.
http://mail.spaminspector.com


"Richard Mueller [MVP]" <rlmueller-NOSPAM@xxxxxxxxxxxxxxxxxxxx> wrote in
message news:eX5sKK4eFHA.220@xxxxxxxxxxxxxxxxxxxxxxx
> Mike wrote:
>
>> I have been asked to come up with a method to inventory some servers and
> add
>> the output to an existing Excel
>> worksheet. I can create the worksheet and add "A" row of data, but I am
>> unsure as to how I would move to the
>> next row.
>>
>> The next question, of course is;
>>
>> Would it be possible to type in a server name in column 1 row 1 and have
> the
>> script execute and populate
>> the rest of the cells in Row 1 with the information gathered by a
> VBScript?
>> And then move down the list
>> populating as it goes?
>
> Hi,
>
> Here is a sample VBScript program that outputs user Distinguished Names to
> an Excel spreadsheet:
>
> http://www.rlmueller.net/Create%20User%20List%203.htm
>
> You refer to cells by row and column. In the code linked above:
>
> objSheet.Cells(i, j) = "Whatever"
>
> where i is the row and j the column. I increment the rows in a loop when I
> enumerate users. The first row is a heading.
>
> Also, you might want to use this example program, which uses WMI to
> inventory all computers in a domain. It also writes the output to an Excel
> spreadsheet.
>
> http://www.rlmueller.net/Inventory.htm
>
> For ADO search filter to retrieve all servers, see the code in this
> program:
>
> http://www.rlmueller.net/Enumerate%20Servers.htm
>
> and to search for all Domain Controllers:
>
> http://www.rlmueller.net/Enumerate%20DCs.htm
>
> --
> Richard
> Microsoft MVP Scripting and ADSI
> Hilltop Lab web site - http://www.rlmueller.net
> --
>
>


.



Relevant Pages

  • Re: VBScript and Out Put to Excel Worksheet
    ... > the output to an existing Excel ... inventory all computers in a domain. ... For ADO search filter to retrieve all servers, see the code in this program: ...
    (microsoft.public.windows.server.scripting)
  • Modified Rich Mueller script output to Excel has blank lines
    ... I am using a modified Rich Mueller script to output my list of servers ... to an Excel spreadsheet. ... ' VBScript program to enumerate all servers in the domain. ... ' Spreadsheet file to be created. ...
    (microsoft.public.windows.server.scripting)
  • RE: Fix Comments
    ... "Mike H" wrote: ... Change NewString to your new name and oldstring to the one you want replacing ... You'll have to close and reopen Excel ...
    (microsoft.public.excel.programming)
  • Re: RefEdit error message "Element not found"
    ... Hi, Mike, thanks for your response. ... I have multiple versions of Excel 97-2007 on my Windows XP system. ... Make sure you have the DLL in the right location. ... of the office libraries. ...
    (microsoft.public.excel.programming)
  • first name/last name comma seperate
    ... The is no way Excel can know which is a first and which is a last name but ... "Mike H" wrote: ... Dim ws As Worksheet ... Dim lastrow As Long ...
    (microsoft.public.excel.programming)