{"action":"created","issue":{"url":"https://api.github.com/repos/dfinke/ImportExcel/issues/351","repository_url":"https://api.github.com/repos/dfinke/ImportExcel","labels_url":"https://api.github.com/repos/dfinke/ImportExcel/issues/351/labels{/name}","comments_url":"https://api.github.com/repos/dfinke/ImportExcel/issues/351/comments","events_url":"https://api.github.com/repos/dfinke/ImportExcel/issues/351/events","html_url":"https://github.com/dfinke/ImportExcel/issues/351","id":332735491,"node_id":"MDU6SXNzdWUzMzI3MzU0OTE=","number":351,"title":"Is it posible to get a other Excel layout?","user":{"login":"Yourivm","id":38697011,"node_id":"MDQ6VXNlcjM4Njk3MDEx","avatar_url":"https://avatars1.githubusercontent.com/u/38697011?v=4","gravatar_id":"","url":"https://api.github.com/users/Yourivm","html_url":"https://github.com/Yourivm","followers_url":"https://api.github.com/users/Yourivm/followers","following_url":"https://api.github.com/users/Yourivm/following{/other_user}","gists_url":"https://api.github.com/users/Yourivm/gists{/gist_id}","starred_url":"https://api.github.com/users/Yourivm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yourivm/subscriptions","organizations_url":"https://api.github.com/users/Yourivm/orgs","repos_url":"https://api.github.com/users/Yourivm/repos","events_url":"https://api.github.com/users/Yourivm/events{/privacy}","received_events_url":"https://api.github.com/users/Yourivm/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-06-15T11:12:27Z","updated_at":"2018-06-19T11:54:11Z","closed_at":null,"author_association":"NONE","body":"I'm new to Powershell scripting (Till now i'm only use oneliners to export info to an CSV file or get things done)\r\nI attached two excel files.\r\nFile 1.xlsx (How i get it now)\r\nFile 2.xlsx (How i want it)\r\n\r\nI know i need to remove the -BoldTopRow etc. \r\n\r\n`# Makes a list of all the information for the export\r\n$Props = [PSCustomObject]@{\r\n    \"ComputerName\" = $Computername\r\n    \"Active User\" = $ActiveUser\r\n    \"Domain/Workgroup\" = $Domain\r\n    \"OS Version\" = ($OSALL | Out-String).Trim()\r\n    \"Manufacturer\" = ($CompAll | Out-String).Trim()\r\n    \"Serial Number\" = $Serial\r\n    \"Bitlocker\" = ($BLInfo | Out-String).Trim()\r\n   \"Local Admin\" = $LocalAdmins\r\n    \"Shares\" = ($Shares | Out-String).Trim()\r\n    \"Printers\" = ($Printers | Out-String).Trim()\r\n    \"AV Name\" = $AVName\r\n    \"AV Up to Date\" = $AVUpdateStatus\r\n    \"AV Enabled\" = $AVProtection\r\n} | Export-Excel $USBDriveletter\\$FileName.xlsx -BoldTopRow -AutoFilter -FreezeTopRow -AutoSize`\r\n[File _1.xlsx](https://github.com/dfinke/ImportExcel/files/2105819/File._1.xlsx)\r\n\r\n[File _2.xlsx](https://github.com/dfinke/ImportExcel/files/2105820/File._2.xlsx)\r\n\r\nThanks for helping and if i need to attach the full script let me know.\r\n\r\nYouri\r\n"},"comment":{"url":"https://api.github.com/repos/dfinke/ImportExcel/issues/comments/398372525","html_url":"https://github.com/dfinke/ImportExcel/issues/351#issuecomment-398372525","issue_url":"https://api.github.com/repos/dfinke/ImportExcel/issues/351","id":398372525,"node_id":"MDEyOklzc3VlQ29tbWVudDM5ODM3MjUyNQ==","user":{"login":"Yourivm","id":38697011,"node_id":"MDQ6VXNlcjM4Njk3MDEx","avatar_url":"https://avatars1.githubusercontent.com/u/38697011?v=4","gravatar_id":"","url":"https://api.github.com/users/Yourivm","html_url":"https://github.com/Yourivm","followers_url":"https://api.github.com/users/Yourivm/followers","following_url":"https://api.github.com/users/Yourivm/following{/other_user}","gists_url":"https://api.github.com/users/Yourivm/gists{/gist_id}","starred_url":"https://api.github.com/users/Yourivm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yourivm/subscriptions","organizations_url":"https://api.github.com/users/Yourivm/orgs","repos_url":"https://api.github.com/users/Yourivm/repos","events_url":"https://api.github.com/users/Yourivm/events{/privacy}","received_events_url":"https://api.github.com/users/Yourivm/received_events","type":"User","site_admin":false},"created_at":"2018-06-19T11:54:11Z","updated_at":"2018-06-19T11:54:11Z","author_association":"NONE","body":"Thank you for the explanation.\r\nIs it possible to do it like this?\r\n\r\n`# Makes a list of all the information for the export\r\n$Props = [psobject]@{\r\n    \"ComputerName\" = $Computername\r\n    \"Active User\" = $ActiveUser\r\n    \"Domain/Workgroup\" = $Domain\r\n    \"OS Version\" = ($OSALL | Out-String).Trim()\r\n    \"Serial Number\" = $Serial\r\n    \"Bitlocker\" = ($BLInfo | Out-String).Trim()\r\n    \"Local Admin\" = $LocalAdmins\r\n   # \"Shares\" = ($Shares | Out-String).Trim()\r\n    \"Printers\" = ($Printers | Out-String).Trim()\r\n    \"AV Name\" = $AVName\r\n    \"AV Up to Date\" = $AVUpdateStatus\r\n    \"AV Enabled\" = $AVProtection\r\n} \r\n\r\n $MyObject = New-Object -TypeName psobject -Property $Props\r\n\r\n\r\n $MyObject | Export-Excel $USBDriveletter\\$FileName.xlsx`\r\n\r\nIf not i need to rewrite my script and it will be a little more complicated. (I think)"}}
{"actor":{"display_login":"Yourivm"}}