Speaking at #DataWeekender

#DataWeekender

This coming Saturday the second edition of the #DataWeekender online conference is going to take place.

The conference contains 45 main sessions & 15 Lightning Talks. I am honoured to inform that my topic An introduction to the ImportExcel PowerShell module has been selected as one of the 15 short talks.

The ImportExcel module by Doug Finke (blog|twitter) enables its users to process Excel files without MS Office installed on the machine.

You can for instance list all the named colors in Excel and see how they look:

# cleanup any previous files
$excelFile = "$env:TEMP\MikeyHowTo.xlsx"
Remove-Item $excelFile -ErrorAction SilentlyContinue

# create an empty spreadsheet
$nul| Export-Excel -Path $excelFile -KillExcel

# open Excel package
$excel = Open-ExcelPackage -Path $excelFile -KillExcel

# get all the named colors
$type = [System.Drawing.Color]
$items = $type | Get-Member -Static -MemberType Properties

# will start coloring cells from 1st row
$i = 1
foreach ($item in $items.Name)
{  
    # cells in the A column
    $cell = "A$i"

    # change the background and name it
    Set-ExcelRange -Worksheet $excel.Sheet1 -Range $cell -BackgroundColor $item -Value $item -AutoSize

    # next!
    $i++
}

# close Excel package
Close-ExcelPackage $excel -Show
System colors exported by ImportExcel

If you wish to learn more have a look at previous posts about the module:
PowerShell into Excel:ImportExcel Module Part 1
PowerShell into Excel:ImportExcel Module Part 2

..or join the free #DataWeekender conference this Saturday – see the schedule.

Thank you,
Mikey

I am a #DataWeekender speaker

Leave a Reply