source stringclasses 1
value | repo stringclasses 33
values | repo_url stringclasses 33
values | path stringlengths 7 179 | language stringclasses 1
value | license stringclasses 4
values | stars int64 2.27k 53.4k | ref stringclasses 4
values | size_bytes int64 48 259k | text stringlengths 48 259k |
|---|---|---|---|---|---|---|---|---|---|
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/Charts/MultiSeries.ps1 | PowerShell | apache-2.0 | 2,711 | master | 712 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
#Get rid of pre-exisiting sheet
$xlSourcefile = "$env:TEMP\ImportExcelExample.xlsx"
Write-Verbose -Verbose -Message "Save location: $xlSourcefile"
Remove-Item $xlSourcefile -ErrorAction Ignore
$data = Invoke-Sum -data (Get-Process) -dime... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/Charts/MultipleCharts.ps1 | PowerShell | apache-2.0 | 2,711 | master | 975 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
#Get rid of pre-exisiting sheet
$xlSourcefile = "$env:TEMP\ImportExcelExample.xlsx"
Write-Verbose -Verbose -Message "Save location: $xlSourcefile"
Remove-Item $xlSourcefile -ErrorAction Ignore
$data = @"
ID,Product,Quantity,Price,Total
1... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/Charts/plot.ps1 | PowerShell | apache-2.0 | 2,711 | master | 919 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
function plot {
param(
$f,
$minx,
$maxx
)
$minx=[math]::Round($minx,1)
$maxx=[math]::Round($maxx,1)
#Get rid of pre-exisiting sheet
$xlSourcefile = "$env:TEMP\ImportExcelExample.xlsx"
W... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/Charts/ChartDataSeparatePage.ps1 | PowerShell | apache-2.0 | 2,711 | master | 867 | $data = ConvertFrom-Csv @"
Region,State,Units,Price
West,Texas,927,923.71
North,Tennessee,466,770.67
East,Florida,520,458.68
East,Maine,828,661.24
West,Virginia,465,053.58
North,Missouri,436,235.67
South,Kansas,214,992.47
North,North Dakota,789,640.72
South,Delaware,712,508.55
"@
$xlfile = "$PSScriptRoot\spike.xlsx"
R... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/Charts/NumberOfVisitors.ps1 | PowerShell | apache-2.0 | 2,711 | master | 743 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
#Get rid of pre-exisiting sheet
$xlSourcefile = "$env:TEMP\ImportExcelExample.xlsx"
Write-Verbose -Verbose -Message "Save location: $xlSourcefile"
Remove-Item $xlSourcefile -ErrorAction Ignore
$data = ConvertFrom-Csv @"
Week, TotalVisit... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/Charts/ChartAndTrendlines.ps1 | PowerShell | apache-2.0 | 2,711 | master | 772 | # Creates a worksheet, addes a chart and then a Linear trendline
try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
#Get rid of pre-exisiting sheet
$xlSourcefile = "$env:TEMP\ImportExcelExample.xlsx"
Write-Verbose -Verbose -Message "Save location: $xlSourcefile"
Remove-Item $xlSourcefile ... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/JoinWorksheet/Join-Worksheet.sample.ps1 | PowerShell | apache-2.0 | 2,711 | master | 2,084 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
#Get rid of pre-exisiting sheet
$xlSourcefile = "$env:TEMP\ImportExcelExample.xlsx"
Write-Verbose -Verbose -Message "Save location: $xlSourcefile"
Remove-Item $xlSourcefile -ErrorAction Ignore
#Create simple pages for 3 stores with prod... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/JoinWorksheet/Join-worksheet-blocks.sample.ps1 | PowerShell | apache-2.0 | 2,711 | master | 1,006 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
#Get rid of pre-exisiting sheet
$xlSourcefile = "$env:TEMP\ImportExcelExample.xlsx"
Write-Verbose -Verbose -Message "Save location: $xlSourcefile"
Remove-Item $xlSourcefile -ErrorAction Ignore
#Export disk volume, and Network adapter to ... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/JoinWorksheet/JoinSalesData.ps1 | PowerShell | apache-2.0 | 2,711 | master | 1,226 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
#Get rid of pre-exisiting sheet
$xlSourcefile = "$env:TEMP\ImportExcelExample.xlsx"
Write-Verbose -Verbose -Message "Save location: $xlSourcefile"
Remove-Item $xlSourcefile -ErrorAction Ignore
$params = @{
AutoSize = $tru... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/ImportColumns/ImportColumns.ps1 | PowerShell | apache-2.0 | 2,711 | master | 436 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
# Create example file
$xlFile = "$PSScriptRoot\ImportColumns.xlsx"
Get-Process | Export-Excel -Path $xlFile
# -ImportColumns will also arrange columns
Import-Excel -Path $xlFile -ImportColumns @(1,3,2) -NoHeader -StartRow 1
# Get only pm, ... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/JustCharts/PieChartPM.ps1 | PowerShell | apache-2.0 | 2,711 | master | 284 | # Get only processes hat have a company name
# Sum up PM by company
# Show the Pie Chart
try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
PieChart -Title "Total PM by Company" `
(Invoke-Sum (Get-Process|Where-Object company) company pm) |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/JustCharts/TryBarChart.ps1 | PowerShell | apache-2.0 | 2,711 | master | 123 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
BarChart (.\TargetData.ps1) "A BarChart" |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/JustCharts/PieChartHandles.ps1 | PowerShell | apache-2.0 | 2,711 | master | 299 | # Get only processes hat have a company name
# Sum up handles by company
# Show the Pie Chart
try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
PieChart -Title "Total Handles by Company" `
(Invoke-Sum (Get-Process | Where-Object company) company handles) |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/JustCharts/CentralLimitTheorem.ps1 | PowerShell | apache-2.0 | 2,711 | master | 413 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
ColumnChart -Title "Central Limit Theorem" -NoLegend ($(
for ($i = 1; $i -le 500; $i++) {
$s = 0
for ($j = 1; $j -le 100; $j++) {
$s += Get-Random -Minimum 0 -Maximum 2
}
... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/JustCharts/TryColumnChart.ps1 | PowerShell | apache-2.0 | 2,711 | master | 131 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
ColumnChart (.\TargetData.ps1) "A ColumnChart" |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/JustCharts/TryPieChart.ps1 | PowerShell | apache-2.0 | 2,711 | master | 123 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
PieChart (.\TargetData.ps1) "A PieChart" |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/JustCharts/TargetData.ps1 | PowerShell | apache-2.0 | 2,711 | master | 277 | $PropertyNames = @("Cost", "Date", "Name")
New-PSItem 1.1 1/1/2015 John $PropertyNames
New-PSItem 2.1 1/2/2015 Tom
New-PSItem 5.1 1/2/2015 Dick
New-PSItem 11.1 1/2/2015 Harry
New-PSItem 7.1 1/2/2015 Jane
New-PSItem 22.1 1/2/2015 Mary
New-PSItem 32.1 1/2/2015 Liz |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/FormatCellStyles/ApplyFormatInScriptBlock.ps1 | PowerShell | apache-2.0 | 2,711 | master | 886 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
#Get rid of pre-exisiting sheet
$xlSourcefile = "$env:TEMP\ImportExcelExample.xlsx"
Write-Verbose -Verbose -Message "Save location: $xlSourcefile"
Remove-Item $xlSourcefile -ErrorAction Ignore
Get-Process |
Select-Object Company,Hand... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/FormatCellStyles/PassInScriptBlock.ps1 | PowerShell | apache-2.0 | 2,711 | master | 667 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
#Get rid of pre-exisiting sheet
$xlSourcefile = "$env:TEMP\ImportExcelExample.xlsx"
Write-Verbose -Verbose -Message "Save location: $xlSourcefile"
Remove-Item $xlSourcefile -ErrorAction Ignore
$RandomStyle = {
param(
$workShe... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/FormatCellStyles/ApplyStyle.ps1 | PowerShell | apache-2.0 | 2,711 | master | 1,060 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
$data = ConvertFrom-Csv @'
Item,Quantity,Price,Total Cost
Footballs,9,21.95,197.55
Cones,36,7.99,287.64
Shin Guards,14,10.95,153.3
Turf Shoes,22,79.95,1758.9
Baseballs,68,7.99,543.32
Baseball Gloves,31,65.00,2015.00
Baseball Bats,38,159.0... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/CommunityContributions/MultipleWorksheets.ps1 | PowerShell | apache-2.0 | 2,711 | master | 1,206 | <#
To see this written up with example screenshots, head over to the IT Splat blog
URL: http://bit.ly/2SxieeM
#>
## Create an Excel file with multiple worksheets
# Get a list of processes on the system
$processes = Get-Process | Sort-Object -Property ProcessName | Group-Object -Property ProcessName | Where-Obj... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/ConditionalFormatting/Highlight-ThisMonth.ps1 | PowerShell | apache-2.0 | 2,711 | master | 432 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
#Get rid of pre-exisiting sheet
$xlSourcefile = "$env:TEMP\ImportExcelExample.xlsx"
Write-Verbose -Verbose -Message "Save location: $xlSourcefile"
Remove-Item $xlSourcefile -ErrorAction Ignore
.\GenDates.ps1 |
Export-Excel $xlSourcef... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/ConditionalFormatting/ConditionalFormattingIcontSetOnlyIcon.ps1 | PowerShell | apache-2.0 | 2,711 | master | 839 | try { Import-Module $PSScriptRoot\..\..\ImportExcel.psd1 } catch { throw ; return }
$data = ConvertFrom-Csv @"
Region,State,Other,Units,Price,InStock
West,Texas,1,927,923.71,1
North,Tennessee,3,466,770.67,0
East,Florida,0,1520,458.68,1
East,Maine,1,1828,661.24,0
West,Virginia,1,465,053.58,1
North,Missouri,1,436,235.67... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/ConditionalFormatting/MonthlyTemperatuesDatabar.ps1 | PowerShell | apache-2.0 | 2,711 | master | 835 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
#Get rid of pre-exisiting sheet
$xlSourcefile = "$env:TEMP\ImportExcelExample.xlsx"
Write-Verbose -Verbose -Message "Save location: $xlSourcefile"
Remove-Item $xlSourcefile -ErrorAction Ignore
$excel = @"
Month,New York City,Austin Texas... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/ConditionalFormatting/ContainsBlanks.ps1 | PowerShell | apache-2.0 | 2,711 | master | 749 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
#Define a "Contains blanks" rule. No format is specified so it default to dark-red text on light-pink background.
$ContainsBlanks = New-ConditionalText -ConditionalType ContainsBlanks
$data = $(
New-PSItem a b c @('p1', 'p2', 'p3')
... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/ConditionalFormatting/HighlightDuplicates.ps1 | PowerShell | apache-2.0 | 2,711 | master | 784 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
#Get rid of pre-exisiting sheet
$xlSourcefile = "$env:TEMP\ImportExcelExample.xlsx"
Write-Verbose -Verbose -Message "Save location: $xlSourcefile"
Remove-Item $xlSourcefile -ErrorAction Ignore
$data = $(
New-PSItem North 111 @('Regi... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/ConditionalFormatting/CodeGenExamples.ps1 | PowerShell | apache-2.0 | 2,711 | master | 441 | "Last7Days", "LastMonth", "LastWeek", "NextMonth", "NextWeek", "ThisMonth", "ThisWeek", "Today", "Tomorrow", "Yesterday" |
Foreach-Object {
$text = @"
`$f = ".\testExport.xlsx"
remove-item `$f -ErrorAction Ignore
.\GenDates.ps1 |
Export-Excel `$f -Show -AutoSize -ConditionalText `$(
New-Conditiona... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/ConditionalFormatting/GetProcess.ps1 | PowerShell | apache-2.0 | 2,711 | master | 1,147 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
#Get rid of pre-exisiting sheet
$xlSourcefile = "$env:TEMP\ImportExcelExample.xlsx"
Write-Verbose -Verbose -Message "Save location: $xlSourcefile"
Remove-Item $xlSourcefile -ErrorAction Ignore
Get-Process | Where-Object Company | Select-... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/ConditionalFormatting/Highlight-NextMonth.ps1 | PowerShell | apache-2.0 | 2,711 | master | 432 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
#Get rid of pre-exisiting sheet
$xlSourcefile = "$env:TEMP\ImportExcelExample.xlsx"
Write-Verbose -Verbose -Message "Save location: $xlSourcefile"
Remove-Item $xlSourcefile -ErrorAction Ignore
.\GenDates.ps1 |
Export-Excel $xlSourcef... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/ConditionalFormatting/SalesReportWithDatabar.ps1 | PowerShell | apache-2.0 | 2,711 | master | 770 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
#Get rid of pre-exisiting sheet
$xlSourcefile = "$env:TEMP\ImportExcelExample.xlsx"
Write-Verbose -Verbose -Message "Save location: $xlSourcefile"
Remove-Item $xlSourcefile -ErrorAction Ignore
$excel = @"
Month,Sales
Jan,1277
Feb,1003
Ma... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/ConditionalFormatting/Databar.ps1 | PowerShell | apache-2.0 | 2,711 | master | 1,890 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
#Get rid of pre-exisiting sheet
$xlSourcefile = "$env:TEMP\ImportExcelExample.xlsx"
Write-Verbose -Verbose -Message "Save location: $xlSourcefile"
Remove-Item $xlSourcefile -ErrorAction Ignore
#Export processes, and get an ExcelPackage ... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/ConditionalFormatting/RangeFormatting.ps1 | PowerShell | apache-2.0 | 2,711 | master | 869 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
#Get rid of pre-exisiting sheet
$xlSourcefile = "$env:TEMP\ImportExcelExample.xlsx"
Write-Verbose -Verbose -Message "Save location: $xlSourcefile"
Remove-Item $xlSourcefile -ErrorAction Ignore
function Get-DateOffset ($days=0) {
(Get... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/ConditionalFormatting/ConditionalText.ps1 | PowerShell | apache-2.0 | 2,711 | master | 1,199 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
#Get rid of pre-exisiting sheet
$xlSourcefile = "$env:TEMP\ImportExcelExample.xlsx"
Write-Verbose -Verbose -Message "Save location: $xlSourcefile"
Remove-Item $xlSourcefile -ErrorAction Ignore
Get-Service |
Select-Object Status, Name... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/ConditionalFormatting/Highlight-NextWeek.ps1 | PowerShell | apache-2.0 | 2,711 | master | 431 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
#Get rid of pre-exisiting sheet
$xlSourcefile = "$env:TEMP\ImportExcelExample.xlsx"
Write-Verbose -Verbose -Message "Save location: $xlSourcefile"
Remove-Item $xlSourcefile -ErrorAction Ignore
.\GenDates.ps1 |
Export-Excel $xlSourcef... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/ConditionalFormatting/FormatCalculations.ps1 | PowerShell | apache-2.0 | 2,711 | master | 1,294 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
#Get rid of pre-exisiting sheet
$xlSourcefile = "$env:TEMP\ImportExcelExample.xlsx"
Write-Verbose -Verbose -Message "Save location: $xlSourcefile"
Remove-Item $xlSourcefile -ErrorAction Ignore
$data = $(
New-PSItem North 111 @( 'Reg... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/ConditionalFormatting/Highlight-Tomorrow.ps1 | PowerShell | apache-2.0 | 2,711 | master | 431 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
#Get rid of pre-exisiting sheet
$xlSourcefile = "$env:TEMP\ImportExcelExample.xlsx"
Write-Verbose -Verbose -Message "Save location: $xlSourcefile"
Remove-Item $xlSourcefile -ErrorAction Ignore
.\GenDates.ps1 |
Export-Excel $xlSourcef... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/ConditionalFormatting/Highlight-Last7Days.ps1 | PowerShell | apache-2.0 | 2,711 | master | 432 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
#Get rid of pre-exisiting sheet
$xlSourcefile = "$env:TEMP\ImportExcelExample.xlsx"
Write-Verbose -Verbose -Message "Save location: $xlSourcefile"
Remove-Item $xlSourcefile -ErrorAction Ignore
.\GenDates.ps1 |
Export-Excel $xlSourcef... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/ConditionalFormatting/Highlight-ThisWeek.ps1 | PowerShell | apache-2.0 | 2,711 | master | 431 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
#Get rid of pre-exisiting sheet
$xlSourcefile = "$env:TEMP\ImportExcelExample.xlsx"
Write-Verbose -Verbose -Message "Save location: $xlSourcefile"
Remove-Item $xlSourcefile -ErrorAction Ignore
.\GenDates.ps1 |
Export-Excel $xlSourcef... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/ConditionalFormatting/Highlight-Yesterday.ps1 | PowerShell | apache-2.0 | 2,711 | master | 432 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
#Get rid of pre-exisiting sheet
$xlSourcefile = "$env:TEMP\ImportExcelExample.xlsx"
Write-Verbose -Verbose -Message "Save location: $xlSourcefile"
Remove-Item $xlSourcefile -ErrorAction Ignore
.\GenDates.ps1 |
Export-Excel $xlSourcef... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/ConditionalFormatting/GenDates.ps1 | PowerShell | apache-2.0 | 2,711 | master | 1,144 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
function Get-DateOffset {
param($days=0)
(Get-Date).AddDays($days).ToShortDateString()
}
function Get-Number {
Get-Random -Minimum 10 -Maximum 100
}
New-PSItem (Get-DateOffset -7) (Get-Number) 'LastWeek,Last7Days,ThisMonth'... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/ConditionalFormatting/Highlight-LastMonth.ps1 | PowerShell | apache-2.0 | 2,711 | master | 432 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
#Get rid of pre-exisiting sheet
$xlSourcefile = "$env:TEMP\ImportExcelExample.xlsx"
Write-Verbose -Verbose -Message "Save location: $xlSourcefile"
Remove-Item $xlSourcefile -ErrorAction Ignore
.\GenDates.ps1 |
Export-Excel $xlSourcef... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/ConditionalFormatting/Highlight-LastWeek.ps1 | PowerShell | apache-2.0 | 2,711 | master | 431 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
#Get rid of pre-exisiting sheet
$xlSourcefile = "$env:TEMP\ImportExcelExample.xlsx"
Write-Verbose -Verbose -Message "Save location: $xlSourcefile"
Remove-Item $xlSourcefile -ErrorAction Ignore
.\GenDates.ps1 |
Export-Excel $xlSourcef... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/ConditionalFormatting/GetConditionalFormatting.ps1 | PowerShell | apache-2.0 | 2,711 | master | 785 | try { Import-Module $PSScriptRoot\..\..\ImportExcel.psd1 } catch { throw ; return}
# This example is using Excel generated by Highlight-DiffCells.ps1
# The displayed rule should be the same as in the PS script
function Get-ConditionalFormatting {
param (
[string] $xlSourcefile
)
$excel = Open-Exc... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/ConditionalFormatting/Highlight-DiffCells.ps1 | PowerShell | apache-2.0 | 2,711 | master | 978 | try { Import-Module $PSScriptRoot\..\..\ImportExcel.psd1 } catch { throw ; return }
$xlSourcefile = "$env:TEMP\ImportExcelExample.xlsx"
Write-Verbose -Verbose -Message "Save location: $xlSourcefile"
Remove-Item $xlSourcefile -ErrorAction Ignore
$data = ConvertFrom-Csv @"
Region,State,Units2021,Units2022
West,Texas,... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/ConditionalFormatting/Highlight-Today.ps1 | PowerShell | apache-2.0 | 2,711 | master | 428 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
#Get rid of pre-exisiting sheet
$xlSourcefile = "$env:TEMP\ImportExcelExample.xlsx"
Write-Verbose -Verbose -Message "Save location: $xlSourcefile"
Remove-Item $xlSourcefile -ErrorAction Ignore
.\GenDates.ps1 |
Export-Excel $xlSourcef... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/ConditionalFormatting/Top10-DataBar-TwoColorScale.ps1 | PowerShell | apache-2.0 | 2,711 | master | 2,177 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
#Get rid of pre-exisiting sheet
$xlSourcefile = "$env:TEMP\ImportExcelExample.xlsx"
Write-Verbose -Verbose -Message "Save location: $xlSourcefile"
Remove-Item $xlSourcefile -ErrorAction Ignore
$data = ConvertFrom-csv @"
Store,January,Fe... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/ConditionalFormatting/TextComparisons.ps1 | PowerShell | apache-2.0 | 2,711 | master | 1,099 | try {Import-Module ..\..\ImportExcel.psd1 -Force} catch {throw ; return}
$data = $(
New-PSItem 100 @('test', 'testx')
New-PSItem 200
New-PSItem 300
New-PSItem 400
New-PSItem 500
)
#Get rid of pre-exisiting sheet
$xlSourcefile1 = "$env:TEMP\ImportExcelExample1.xl... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/InvokeExcelQuery/Examples.ps1 | PowerShell | apache-2.0 | 2,711 | master | 497 | try { Import-Module $PSScriptRoot\..\..\ImportExcel.psd1 } catch { throw ; return }
$queries =
'select * from [sheet1$A:A]',
'select * from [sheet1$]',
'select * from [sheet1$A2:E11]',
'select F2,F5 from [sheet1$A2:E11]',
'select * from [sheet1$A2:E11] where F2 = "Grocery"',
'select F2 as [Category], F5 as [Discount]... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/SQL+FillColumns+Pivot/Example.ps1 | PowerShell | apache-2.0 | 2,711 | master | 5,911 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
$sql = @"
SELECT rootfile.baseName , rootfile.extension , Image.fileWidth AS width , image.fileHeight AS height ,
metadata.dateDay , metadata.dateMonth , metadata.dateYear ... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/SQL+FillColumns+Pivot/Example2.ps1 | PowerShell | apache-2.0 | 2,711 | master | 1,591 | #requires -modules "getSql"
try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
#download f1Results from https://1drv.ms/f/s!AhfYu7-CJv4egbt5FD7Cdxi8jSz3aQ and update the path below
Get-SQL -Session f1 -Excel -Connection C:\Users\mcp\OneDrive\Public\F1\f1Results.xlsx -showtables -Verbose... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/PesterTestReport/Pester test report.ps1 | PowerShell | apache-2.0 | 2,711 | master | 7,646 | #Requires -Modules @{ ModuleName='Pester'; ModuleVersion='5.1' }
<#
.SYNOPSIS
Run Pester tests and export the results to an Excel file.
.DESCRIPTION
Use the `PesterConfigurationFile` to configure Pester to your requirements.
(Set the Path to the folder containing the tests, ...). Pester will be
invo... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/Extra/Get-ModuleStats.ps1 | PowerShell | apache-2.0 | 2,711 | master | 1,004 | <#
.Synopsis
Chart download stats for modules/scripts published on the PowerShell Gallery
.Example
.\Get-ModuleStats.ps1 ImportExcel
#>
param(
$moduleName = "ImportExcel",
[ValidateSet('Column','Bar','Line','Pie')]
$chartType="Line"
)
$download = Get-HtmlTable "https://www.powershellgaller... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/MortgageCalculator/MortgageCalculator.ps1 | PowerShell | apache-2.0 | 2,711 | master | 1,595 | <#
Fixed Rate Loan/Mortgage Calculator in Excel
#>
param(
$Amount = 400000,
$InterestRate = .065,
$Term = 30
)
try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
function New-CellData {
[Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangin... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/AddWorkSheet/AddWorkSheet.ps1 | PowerShell | apache-2.0 | 2,711 | master | 719 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
#Get rid of pre-exisiting sheet
$xlSourcefile = "$env:TEMP\ImportExcelExample.xlsx"
Write-Verbose -Verbose -Message "Save location: $xlSourcefile"
Remove-Item $xlSourcefile -ErrorAction Ignore
#Put some simple data in a worksheet and Get... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/AddWorkSheet/AddMultiWorkSheet.ps1 | PowerShell | apache-2.0 | 2,711 | master | 741 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
#Get rid of pre-exisiting sheet
$xlSourcefile = "$env:TEMP\ImportExcelExample.xlsx"
Write-Verbose -Verbose -Message "Save location: $xlSourcefile"
Remove-Item $xlSourcefile -ErrorAction Ignore
#Put some simple data in a worksheet and Get... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/PivotTableFilters/testPivotFilter.ps1 | PowerShell | apache-2.0 | 2,711 | master | 811 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
$xlFile="$env:TEMP\testPivot.xlsx"
Remove-Item $xlFile -ErrorAction Ignore
$data =@"
Region,Area,Product,Units,Cost
North,A1,Apple,100,.5
South,A2,Pear,120,1.5
East,A3,Grape,140,2.5
West,A4,Banana,160,3.5
North,A1,Pear,120,1.5
North,A1,G... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/Grouping/GroupNumericRow.ps1 | PowerShell | apache-2.0 | 2,711 | master | 835 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
#Get rid of pre-exisiting sheet
$xlSourcefile = "$env:TEMP\ImportExcelExample.xlsx"
Write-Verbose -Verbose -Message "Save location: $xlSourcefile"
Remove-Item $xlSourcefile -ErrorAction Ignore
$PivotTableDefinition = New-PivotTableDefin... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/Grouping/GroupDateColumn.ps1 | PowerShell | apache-2.0 | 2,711 | master | 790 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
#Get rid of pre-exisiting sheet
$xlSourcefile = "$env:TEMP\ImportExcelExample.xlsx"
Write-Verbose -Verbose -Message "Save location: $xlSourcefile"
Remove-Item $xlSourcefile -ErrorAction Ignore
$PivotTableDefinition = New-PivotTableDefini... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/Grouping/GroupNumericColumn.ps1 | PowerShell | apache-2.0 | 2,711 | master | 851 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
#Get rid of pre-exisiting sheet
$xlSourcefile = "$env:TEMP\ImportExcelExample.xlsx"
Write-Verbose -Verbose -Message "Save location: $xlSourcefile"
Remove-Item $xlSourcefile -ErrorAction Ignore
$PivotTableDefinition = New-PivotTableDefin... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/Grouping/TimestampBucket.ps1 | PowerShell | apache-2.0 | 2,711 | master | 1,381 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
$data = ConvertFrom-Csv @"
Timestamp,Tenant
10/29/2018 3:00:00.123,1
10/29/2018 3:00:10.456,1
10/29/2018 3:01:20.389,1
10/29/2018 3:00:30.222,1
10/29/2018 3:00:40.143,1
10/29/2018 3:00:50.809,1
10/29/2018 3:01:00.193,1
10/29/2018 3:01:10.55... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/Grouping/GroupDateRow.ps1 | PowerShell | apache-2.0 | 2,711 | master | 774 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
#Get rid of pre-exisiting sheet
$xlSourcefile = "$env:TEMP\ImportExcelExample.xlsx"
Write-Verbose -Verbose -Message "Save location: $xlSourcefile"
Remove-Item $xlSourcefile -ErrorAction Ignore
$PivotTableDefinition = New-PivotTableDefini... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/FormatResults/GetAsMarkdownTable.ps1 | PowerShell | apache-2.0 | 2,711 | master | 305 | param(
[Alias('FullName')]
[String[]]$Path
)
if ($PSVersionTable.PSVersion.Major -gt 5 -and -not (Get-Command Format-Markdown -ErrorAction SilentlyContinue)) {
throw "This requires EZOut. Install-Module EZOut -AllowClobber -Scope CurrentUser"
}
Import-Excel $Path | Format-Markdown |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/FormatResults/GetAsYaml.ps1 | PowerShell | apache-2.0 | 2,711 | master | 296 | param(
[Alias('FullName')]
[String[]]$Path
)
if ($PSVersionTable.PSVersion.Major -gt 5 -and -not (Get-Command Format-YAML -ErrorAction SilentlyContinue)) {
throw "This requires EZOut. Install-Module EZOut -AllowClobber -Scope CurrentUser"
}
Import-Excel $Path | Format-YAML |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/GenerateData/GenDataForCustomReport.ps1 | PowerShell | apache-2.0 | 2,711 | master | 1,079 | if(!(Get-Command ig -ErrorAction SilentlyContinue)) {
"Use ``Install-Module NameIT`` to get the needed module from the gallery to support running this script"
return
}
$sign=@{sign=@( "+", "-" )}
$location=@{location=@("Atlanta", "Newark", "Washington", "Chicago", "Philadelphia", "Houston", "Phoneix")}
$(1... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/ExcelBuiltIns/DSUM.ps1 | PowerShell | apache-2.0 | 2,711 | master | 1,258 | # DSUM
# Adds the numbers in a field (column) of records in a list or database that match conditions that you specify.
try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
#Get rid of pre-exisiting sheet
$xlSourcefile = "$env:TEMP\ImportExcelExample.xlsx"
Write-Verbose -Verbose -Message "Sa... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/ExcelBuiltIns/VLOOKUP.ps1 | PowerShell | apache-2.0 | 2,711 | master | 710 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
#Get rid of pre-exisiting sheet
$xlSourcefile = "$env:TEMP\ImportExcelExample.xlsx"
Write-Verbose -Verbose -Message "Save location: $xlSourcefile"
Remove-Item $xlSourcefile -ErrorAction Ignore
$data = ConvertFrom-Csv @"
Fruit,Amount
App... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/XlRangeToImage/XlRangeToImage.ps1 | PowerShell | apache-2.0 | 2,711 | master | 661 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
. .\ConvertExcelToImageFile.ps1
$xlFileName = "C:\Temp\testPNG.xlsx"
Remove-Item C:\Temp\testPNG.xlsx -ErrorAction Ignore
$range = @"
Region,Item,Cost
North,Pear,1
South,Apple,2
East,Grapes,3
West,Berry,4
North,Pear,1
South,Apple,2
Ea... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/Experimental/Export-MultipleExcelSheets.ps1 | PowerShell | apache-2.0 | 2,711 | master | 1,378 | function Export-MultipleExcelSheets {
<#
.Synopsis
Takes a hash table of scriptblocks and exports each as a sheet in an Excel file
.Example
$p = Get-Process
$InfoMap = @{
PM = { $p | Select-Object company, pm }
Handles = { $p | Select-Object company, ... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/Experimental/tryExportMultipleExcelSheets.ps1 | PowerShell | apache-2.0 | 2,711 | master | 825 | . "$PSScriptRoot\Export-MultipleExcelSheets.ps1"
#Get rid of pre-exisiting sheet
$xlSourcefile = "$env:TEMP\ImportExcelExample.xlsx"
Write-Verbose -Verbose -Message "Save location: $xlSourcefile"
Remove-Item $xlSourcefile -ErrorAction Ignore
$p = Get-Process
$InfoMap = @{
PM = { $p | Select-Obje... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/ReadAllSheets/Get-ExcelSheets.ps1 | PowerShell | apache-2.0 | 2,711 | master | 298 | # Get-ExcelSheets
param(
[Parameter(Mandatory)]
$path
)
$hash = @{ }
$e = Open-ExcelPackage $path
foreach ($sheet in $e.workbook.worksheets) {
$hash[$sheet.name] = Import-Excel -ExcelPackage $e -WorksheetName $sheet.name
}
Close-ExcelPackage $e -NoSave
$hash |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/ReadAllSheets/ReadAllSheets.ps1 | PowerShell | apache-2.0 | 2,711 | master | 105 | $xlfile = "$env:TEMP\MultipleSheets.xlsx"
.\GenerateXlsx.ps1 $xlfile
.\Get-ExcelSheets.ps1 $xlfile |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/ReadAllSheets/GenerateXlsx.ps1 | PowerShell | apache-2.0 | 2,711 | master | 911 | param(
[Parameter(Mandatory)]
$path
)
$sheet1 = ConvertFrom-Csv @"
Region,Item,TotalSold
West,melon,27
North,avocado,21
West,kiwi,84
East,melon,23
North,kiwi,8
North,nail,29
North,kiwi,46
South,nail,83
East,pear,10
South,avocado,40
"@
$sheet2 = ConvertFrom-Csv @"
Region,Item,TotalSold
West,lemon,24
North,ham... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/SetColumnBackgroundColor/SetColumnBackgroundColor.ps1 | PowerShell | apache-2.0 | 2,711 | master | 485 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
$path = "$env:TEMP\testBackgroundColor.xlsx"
$p = Get-Process | Select-Object Company, Handles | Export-Excel $path -ClearSheet -PassThru
$ws = $p.Workbook.WorkSheets[1]
$totalRows = $ws.Dimension.Rows
#Set the range from B2 t... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/Styles/MultipleStyles.ps1 | PowerShell | apache-2.0 | 2,711 | master | 1,004 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
$xlfile = "$env:TEMP\test.xlsx"
Remove-Item $xlfile -ErrorAction SilentlyContinue
$data = ConvertFrom-Csv @"
Region,Item,TotalSold
North,melon,38
South,screwdriver,21
South,peach,33
South,saw,81
South,kiwi,70
North,orange,59
North,avocado... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/Styles/NewExcelStyle.ps1 | PowerShell | apache-2.0 | 2,711 | master | 729 | # https://raw.githubusercontent.com/dfinke/ImportExcel/master/images/NewExcelStyle.png
try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
$xlfile = "$env:TEMP\test.xlsx"
Remove-Item $xlfile -ErrorAction SilentlyContinue
$data = ConvertFrom-Csv @"
Region,Item,TotalSold
North,melon,38
South... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/Freeze/FreezePane.ps1 | PowerShell | apache-2.0 | 2,711 | master | 2,603 | # Freeze the columns/rows to left and above the cell
$data = ConvertFrom-Csv @"
Region,State,Units,Price,Name,NA,EU,JP,Other
West,Texas,927,923.71,Wii Sports,41.49,29.02,3.77,8.46
West,Texas,927,923.71,Wii Sports,41.49,29.02,3.77,8.46
West,Texas,927,923.71,Wii Sports,41.49,29.02,3.77,8.46
West,Texas,927,923.71,Wii Spo... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/Sparklines/SalesByQuarter.ps1 | PowerShell | apache-2.0 | 2,711 | master | 961 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
$xlfile = "$env:TEMP\SalesByQuarter.xlsx"
Remove-Item $xlfile -ErrorAction SilentlyContinue
$data = ConvertFrom-Csv @"
Region,Q1,Q2,Q3,Q4,YTDPerformance
Asia,1400,7200,5700,6900
Europe,3400,2300,9400,7300
Midwest,4700,9300,3700,8600
North... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/Sparklines/Sparklines.ps1 | PowerShell | apache-2.0 | 2,711 | master | 4,056 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
class data {
[datetime]$Date
[Double]$AUD
[Double]$CAD
[Double]$CHF
[Double]$DKK
[Double]$EUR
[Double]$GBP
[Double]$HKD
[Double]$JPY
[Double]$MYR
[Double]$NOK
[Double]$NZD
[Double]$RUB
... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/PivotTable/TableAndPivotTable.ps1 | PowerShell | apache-2.0 | 2,711 | master | 1,939 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
#Get rid of pre-exisiting sheet
$xlSourcefile = "$env:TEMP\ImportExcelExample.xlsx"
Write-Verbose -Verbose -Message "Save location: $xlSourcefile"
Remove-Item $xlSourcefile -ErrorAction Ignore
#Export some sales data to Excel, format it ... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/PivotTable/MultiplePivotTables.ps1 | PowerShell | apache-2.0 | 2,711 | master | 1,918 | $data = ConvertFrom-Csv @"
Region,Date,Fruit,Sold
North,1/1/2017,Pears,50
South,1/1/2017,Pears,150
East,4/1/2017,Grapes,100
West,7/1/2017,Bananas,150
South,10/1/2017,Apples,200
North,1/1/2018,Pears,100
East,4/1/2018,Grapes,200
West,7/1/2018,Bananas,300
South,10/1/2018,Apples,400
"@ | Select-Object -Property Region, @{n... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/PivotTable/PivotTableWithName.ps1 | PowerShell | apache-2.0 | 2,711 | master | 776 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
$ExcelParams = @{
Path = "$env:TEMP\test1.xlsx"
IncludePivotTable = $true
PivotRows = 'Company'
PivotTableName = 'MyTable'
PivotData = @{'Handles' = 'sum'}
Show = $true
... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/ExcelDataValidation/MutipleValidations.ps1 | PowerShell | apache-2.0 | 2,711 | master | 2,788 | #region Setup
<#
This examples demos three types of validation:
* Creating a list using a PowerShell array
* Creating a list data from another Excel Worksheet
* Creating a rule for numbers to be between 0 an 10000
Run the script then try"
* Add random data in Column B
... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/CustomNumbers/ShortenNumbers.ps1 | PowerShell | apache-2.0 | 2,711 | master | 445 | # How to convert abbreviate or shorten long numbers in Excel
Remove-Item .\custom.xlsx -ErrorAction SilentlyContinue
$data = $(
12000
1000
2000
3000
2400
3600
6000
13000
40000
400000
1000000
)
$excel = $data | Export-Excel .\custom.xlsx -PassThru
Set-ExcelRange -Work... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/Tables/MultipleTables.ps1 | PowerShell | apache-2.0 | 2,711 | master | 1,798 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
$xlfile = "$env:Temp\testData.xlsx"
Remove-Item $xlfile -ErrorAction SilentlyContinue
$r = Get-ChildItem C:\WINDOWS\system32
$BySize=@{}
$r | ForEach-Object{ $BySize.($_.extension)+=$_.length }
$top10BySize = $BySize.GetEnumerator() |
... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/Tables/SalesData-WithTotalRow.ps1 | PowerShell | apache-2.0 | 2,711 | master | 989 | try { Import-Module $PSScriptRoot\..\..\ImportExcel.psd1 } catch { throw ; return }
$data = ConvertFrom-Csv @"
OrderId,Category,Sales,Quantity,Discount
1,Cosmetics,744.01,07,0.7
2,Grocery,349.13,25,0.3
3,Apparels,535.11,88,0.2
4,Electronics,524.69,60,0.1
5,Electronics,439.10,41,0.0
6,Apparels,56.84,54,0.8
7,Electronic... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/Tables/TotalsRow.ps1 | PowerShell | apache-2.0 | 2,711 | master | 598 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
$r = Get-ChildItem C:\WINDOWS\system32 -File
$TotalSettings = @{
Name = "Count"
# You can create the formula in an Excel workbook first and copy-paste it here
# This syntax can only be used for the Custom type
Extension =... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/MoveSheets/MoveSheets.ps1 | PowerShell | apache-2.0 | 2,711 | master | 730 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
$xlfile = "$env:TEMP\testThis.xlsx"
Remove-Item $xlfile -ErrorAction Ignore
1..10 | Export-Excel $xlfile -WorkSheetname First #'First' will be the only sheet
11..20 | Export-Excel $xlfile -WorkSheetname Second -... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/InteractWithOtherModules/ScriptAnalyzer/Analyze_this.ps1 | PowerShell | apache-2.0 | 2,711 | master | 2,530 | <#
.Synopsis
Runs PsScriptAnalyzer against one or more folders and pivots the results to form a report.
.Example
Analyze_this.ps1
Invokes script analyzer on the current directory; creates a file in $env:temp and opens it in Excel
.Example
Analyze_this.ps1 -xlfile ..\mymodule.xlsx -quiet
Invok... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/InteractWithOtherModules/Pester/Analyze_that.ps1 | PowerShell | apache-2.0 | 2,711 | master | 716 | param(
$PesterTestsPath = "$PSScriptRoot\..\..\..\__tests__\"
)
$xlfile = "$env:Temp\testResults.xlsx"
Remove-Item $xlfile -ErrorAction SilentlyContinue
$xlparams = @{
Path = $xlfile
InputObject = (Invoke-Pester -Script $PesterTestsPath -PassThru).TestResult | Sort-Object describe
W... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/OutTabulator/tryConvertFromExcel.ps1 | PowerShell | apache-2.0 | 2,711 | master | 376 | [CmdletBinding()]
param($outFile = "$PSScriptRoot\targetout.html")
$columnOptions = @()
$columnOptions += New-ColumnOption -ColumnName Progress -formatter progress
$columnOptions += New-ColumnOption -ColumnName Activity -formatter lineFormatter
ConvertFrom-Excel -ExcelFile $PSScriptRoot\test.xlsx -outFile $PSScriptR... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/OutTabulator/start-demo.ps1 | PowerShell | apache-2.0 | 2,711 | master | 9,167 | ## Start-Demo.ps1
##################################################################################################
## This is an overhaul of Jeffrey Snover's original Start-Demo script by Joel "Jaykul" Bennett
##
## I've switched it to using ReadKey instead of ReadLine (you don't have to hit Enter each time)
## As a ... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/Plot/PlotCos.ps1 | PowerShell | apache-2.0 | 2,711 | master | 217 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
$plt = New-Plot
$plt.Plot((Get-Range 0 5 .02|Foreach-Object {[math]::Cos(2*[math]::pi*$_)}))
$plt.SetChartSize(800,300)
$plt.Show() |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/MergeWorkSheet/Merge_2_Servers_Services.ps1 | PowerShell | apache-2.0 | 2,711 | master | 1,454 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
Remove-Item -Path "$env:temp\server*.xlsx" , "$env:temp\Combined*.xlsx" -ErrorAction SilentlyContinue
#Get a subset of services into $s and export them
[System.Collections.ArrayList]$s = Get-service | Select-Object -first 25 -Property *
... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/MergeWorkSheet/Merge_3_Servers_Services.ps1 | PowerShell | apache-2.0 | 2,711 | master | 1,944 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
Remove-Item -Path "$env:temp\server*.xlsx" , "$env:temp\Combined*.xlsx" -ErrorAction SilentlyContinue
#Get a subset of services into $s and export them
[System.Collections.ArrayList]$s = Get-service | Select-Object -first 25 -Property Na... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/MergeWorkSheet/MergeCSV.ps1 | PowerShell | apache-2.0 | 2,711 | master | 555 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
#Get rid of pre-exisiting sheet
$xlSourcefile = "$env:TEMP\ImportExcelExample.xlsx"
Write-Verbose -Verbose -Message "Save location: $xlSourcefile"
Remove-Item $xlSourcefile -ErrorAction Ignore
$leftCsv = @"
MyProp1,MyProp2,Length
a,b,10
... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/Nasa/FireBalls.ps1 | PowerShell | apache-2.0 | 2,711 | master | 569 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
$header = @(
'Date/Time - Peak Brightness (UT)' ,
'Latitude (Deg)' ,
'Longitude (Deg)' ,
'Altitude (km)' ,
'Velocity (km/s)' ,
'Velocity Components (km/s) vx' ,
'Velocity Components (km/s) vy' ,
'Velocity Co... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/CustomizeExportExcel/Out-Excel.ps1 | PowerShell | apache-2.0 | 2,711 | master | 3,494 | <#
This is an example on how to customize Export-Excel to your liking.
First select a name for your function, in ths example its "Out-Excel" you can even set the name to "Export-Excel".
You can customize the following things:
1. To add parameters to the function define them in "param()", here I added "P... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/HyperLinks/Hyperlinks.ps1 | PowerShell | apache-2.0 | 2,711 | master | 237 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
@"
site,link
google,http://www.google.com
stackoverflow,http://stackoverflow.com
microsoft,http://microsoft.com
"@ | ConvertFrom-Csv | Export-Excel |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/HyperLinks/Races.ps1 | PowerShell | apache-2.0 | 2,711 | master | 1,666 | #First 10 races is a CSV file containing the top 10 finishers for the first 10 Formula one races of 2018. Read this file and group the results by race
#We will create links to each race in the first 10 rows of the spreadSheet
#The next row will be column labels
#After that will come a block for each race.
try {Import-M... |
github | dfinke/ImportExcel | https://github.com/dfinke/ImportExcel | Examples/ConvertFrom/ConvertFrom.ps1 | PowerShell | apache-2.0 | 2,711 | master | 406 | try {Import-Module $PSScriptRoot\..\..\ImportExcel.psd1} catch {throw ; return}
ConvertFrom-ExcelToSQLInsert People .\testSQLGen.xlsx
ConvertFrom-ExcelData .\testSQLGen.xlsx {
param($propertyNames, $record)
$reportRecord = @()
foreach ($pn in $propertyNames) {
$reportRecord += "{0}: {1}" -f $pn, ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.