diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index 2d3f445..0000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "type": "PowerShell", - "request": "launch", - "name": "PowerShell Pester Tests", - "script": "Import-Module -Name '.\\' -Force ; Invoke-Pester", // Change to '.\\ModuleName.psd1' if Git name different - "args": [""], - "cwd": "${workspaceFolder}" - }, - { - "type": "PowerShell", - "request": "launch", - "name": "PowerShell Launch Current File", - "script": "${file}", - "args": [], - "cwd": "${file}" - }, - { - "type": "PowerShell", - "request": "launch", - "name": "PowerShell Launch Current File in Temporary Console", - "script": "${file}", - "args": [], - "cwd": "${file}", - "createTemporaryIntegratedConsole": true - }, - { - "type": "PowerShell", - "request": "launch", - "name": "PowerShell Launch Current File w/Args Prompt", - "script": "${file}", - "args": [ - "${command:SpecifyScriptArgs}" - ], - "cwd": "${file}" - }, - { - "type": "PowerShell", - "request": "attach", - "name": "PowerShell Attach to Host Process", - "processId": "${command:PickPSHostProcess}", - "runspaceId": 1 - }, - { - "type": "PowerShell", - "request": "launch", - "name": "PowerShell Interactive Session", - "cwd": "" - } - ] -} \ No newline at end of file diff --git a/ImportExcel.psd1 b/ImportExcel.psd1 index c8837fd..28b2dbf 100644 --- a/ImportExcel.psd1 +++ b/ImportExcel.psd1 @@ -6,7 +6,7 @@ RootModule = 'ImportExcel.psm1' # Version number of this module. - ModuleVersion = '7.2.0' + ModuleVersion = '7.2.1' # ID used to uniquely identify this module GUID = '60dd4136-feff-401a-ba27-a84458c57ede' diff --git a/Public/Read-Clipboard.ps1 b/Public/Read-Clipboard.ps1 index 1195232..8ec06ca 100644 --- a/Public/Read-Clipboard.ps1 +++ b/Public/Read-Clipboard.ps1 @@ -62,7 +62,9 @@ function ReadClipboardImpl { ConvertFrom-Json $data } catch { - if ($data.indexof(",") -gt -1) { + $dataLines = @($data -split "`r`n?" | Select-Object -First 1) + + if ($dataLines[0].indexOf(',') -gt -1) { ConvertFrom-Csv $data } else { diff --git a/changelog.md b/changelog.md index d97f7a3..2e34c3c 100644 --- a/changelog.md +++ b/changelog.md @@ -1,4 +1,7 @@ +# v7.2.1 + +- Improve auto-detection of data on the clipboard # v7.2.0 - Added `Read-Clipboard` support for Windows. Read text from clipboard. It can read CSV or JSON. Plus, you can specify the delimiter and headers.