forked from dfinke/ImportExcel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Install.ps1
52 lines (45 loc) · 1.35 KB
/
Install.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
param([string]$InstallDirectory)
$fileList = echo `
EPPlus.dll `
ImportExcel.psd1 `
ImportExcel.psm1 `
Export-Excel.ps1 `
New-ConditionalFormattingIconSet.ps1 `
Export-ExcelSheet.ps1 `
New-ExcelChart.ps1 `
Invoke-Sum.ps1 `
InferData.ps1 `
Get-ExcelColumnName.ps1 `
Get-XYRange.ps1 `
Charting.ps1 `
New-PSItem.ps1 `
Pivot.ps1 `
New-ConditionalText.ps1 `
Get-HtmlTable.ps1 `
Import-Html.ps1 `
Get-ExcelSheetInfo.ps1 `
Get-ExcelWorkbookInfo.ps1 `
Get-Range.ps1 `
TrackingUtils.ps1 `
Copy-ExcelWorkSheet.ps1 `
Set-CellStyle.ps1 `
plot.ps1
if ('' -eq $InstallDirectory)
{
$personalModules = Join-Path -Path ([Environment]::GetFolderPath('MyDocuments')) -ChildPath WindowsPowerShell\Modules
if (($env:PSModulePath -split ';') -notcontains $personalModules) {
Write-Warning "$personalModules is not in `$env:PSModulePath"
}
if (!(Test-Path $personalModules)) {
Write-Error "$personalModules does not exist"
}
$InstallDirectory = Join-Path -Path $personalModules -ChildPath ImportExcel
}
if (!(Test-Path $InstallDirectory)) {
$null = mkdir $InstallDirectory
}
$wc = New-Object System.Net.WebClient
$fileList |
ForEach-Object {
$wc.DownloadFile("https://raw.github.com/dfinke/ImportExcel/master/$_","$installDirectory\$_")
}