Well, this is not exactly rocket science, but it helped me out today with some spreadsheets tomfoolery. It generates PSCustomObjects with properties named after the header row in the Excel sheet (you need a header row for this to work), just like Import-Csv. The parameters should be self-explanatory: filename and worksheet.
param ( [
if
# resolve relative paths$filename = Resolve-Path $filename
# assume header row (HDR=YES)
$connection
$command
Page rendered at Friday, September 05, 2008 9:35:04 PM (Eastern Standard Time, UTC-05:00)
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.