skip to main | skip to sidebar

Todd's World

Sunday, December 30, 2007

PowerShell & Excel Fun

 

Create a Excel COM Object and manipulate it using Powershell

$a = New-Object -comobject Excel.Application
$a.Visible = $True
$b = $a.Workbooks.Add()
$c = $b.Worksheets.Item(1)
$c.Cells.Item(1,1) = "A value in cell A1."
$b.SaveAs("C:\Scripts\Test.xls")
$a.Quit()

From : http://www.microsoft.com/technet/scriptcenter/resources/qanda/sept06/hey0908.mspx

Posted by Todd at 7:11 PM

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Blog Archive

  • ►  2009 (672)
    • ►  April (125)
    • ►  March (236)
    • ►  February (175)
    • ►  January (136)
  • ►  2008 (467)
    • ►  December (103)
    • ►  November (138)
    • ►  October (84)
    • ►  September (27)
    • ►  August (43)
    • ►  July (18)
    • ►  June (23)
    • ►  May (2)
    • ►  April (4)
    • ►  March (4)
    • ►  February (14)
    • ►  January (7)
  • ▼  2007 (9)
    • ▼  December (9)
      • PowerShell & Excel Fun
      • SQL Certification Live Meeting February 6
      • True Giuliani
      • Playing in the snow
      • Extang Tonneau Cover
      • Crook County Perspectives
      • Windows Server 2008 Component Posters
      • Post with Updated Live Writer
      • Test Post using Live Writer

About Me

My photo
Todd
View my complete profile


Followers