mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-06 00:23:20 +00:00
Improve auto-detection of data on the clipboard
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user