Closed simpletechgithub closed 4 months ago
hi @simpletechgithub need a simple script that repos the issue
Trying to think what we could demo it on... essentially
1) hit an API with a get request
Invoke-RestMethod -Uri $url -Method Get -Headers $headers
2) store some data in a variable
3) Try and export that to an existing spreadsheet with the "-Append" switch
You don't happen to have your own Jira instance, do you?
If I got it right there must be a single table. If so and you are trying to append line by line to the excel table your code wont work. First off, build data, then pass them to the final pipeline
$group1 = $group1emails | foreach-object {
[pscustomobject]@{GroupName = "group1"; EmailAddress = $_}
}
$group2 = $group2emails | foreach-object {
[pscustomobject]@{GroupName = "group2"; EmailAddress = $_}
}
$group1 + $group2 | Export-Excel -Path $jiragroupsxlsx
Thanks for looking into this, awesome.. I'm back on my work laptop tomorrow and will try it if I don't give it a go from a demo jira tonight 👍
Heya dfinke, I'm trying to export some data, and "add" it (append) to the empty row of an existing worksheet
Here is the full, sanitised code...