Open mtengmo opened 1 year ago
I got an array, if I export them with export-excel, the output differs compared to export-csv, what could be the root cause here? See screenshot on the amount 60.00 that is added to the row with deposit type=full.
$mergeempty = $merge | Where-Object { !([string]::IsNullOrEmpty($."POSITION ID")) } $merge_empty | Export-Excel "c:\temp\deposite.xlsx" -NoNumberConversion * $merge_empty | export-csv c:\temp\deposite.csv -NoTypeInformation -Delimiter ";"
$merge_empty | get-member
TypeName: Selected.System.Management.Automation.PSCustomObject
Name MemberType Definition
Equals Method bool Equals(System.Object obj) GetHashCode Method int GetHashCode() GetType Method type GetType() ToString Method string ToString() ACCOUNT NUMBER NoteProperty string ACCOUNT NUMBER=xxxxxx ASSOCIATE ID NoteProperty string ASSOCIATE ID=999 BONUS PAY NoteProperty string BONUS PAY=N COMPANY CODE NoteProperty string COMPANY CODE=KPT DEDUCTION NoteProperty string DEDUCTION=X - savings DEPOSIT AMOUNT NoteProperty string DEPOSIT AMOUNT=999.00 DEPOSIT PERCENT NoteProperty object DEPOSIT PERCENT=null DEPOSIT TYPE NoteProperty string DEPOSIT TYPE=Partial EFFECTIVE DATE NoteProperty string EFFECTIVE DATE=xxxxx FILE # NoteProperty string FILE #=000112 HOME DEPARTMENT NoteProperty string HOME DEPARTMENT=xxxxx NAME NoteProperty string NAME=xxxxxxx POSITION ID NoteProperty string POSITION ID=KPT000999 PRIORITY # NoteProperty object PRIORITY #=null ROUTING NUMBER NoteProperty string ROUTING NUMBER=xxxxxx TAX ID NoteProperty string TAX ID=xxxxxxx workerid NoteProperty System.String workerid=999
Thanks for trying the PowerShell Excel module.
In order to better help. Please post a small (small) script, with data that reproduces the issue.
I got an array, if I export them with export-excel, the output differs compared to export-csv, what could be the root cause here? See screenshot on the amount 60.00 that is added to the row with deposit type=full.
$mergeempty = $merge | Where-Object { !([string]::IsNullOrEmpty($."POSITION ID")) } $merge_empty | Export-Excel "c:\temp\deposite.xlsx" -NoNumberConversion * $merge_empty | export-csv c:\temp\deposite.csv -NoTypeInformation -Delimiter ";"
$merge_empty | get-member
TypeName: Selected.System.Management.Automation.PSCustomObject
Name MemberType Definition
Equals Method bool Equals(System.Object obj) GetHashCode Method int GetHashCode() GetType Method type GetType() ToString Method string ToString() ACCOUNT NUMBER NoteProperty string ACCOUNT NUMBER=xxxxxx ASSOCIATE ID NoteProperty string ASSOCIATE ID=999 BONUS PAY NoteProperty string BONUS PAY=N COMPANY CODE NoteProperty string COMPANY CODE=KPT DEDUCTION NoteProperty string DEDUCTION=X - savings DEPOSIT AMOUNT NoteProperty string DEPOSIT AMOUNT=999.00 DEPOSIT PERCENT NoteProperty object DEPOSIT PERCENT=null DEPOSIT TYPE NoteProperty string DEPOSIT TYPE=Partial EFFECTIVE DATE NoteProperty string EFFECTIVE DATE=xxxxx FILE # NoteProperty string FILE #=000112 HOME DEPARTMENT NoteProperty string HOME DEPARTMENT=xxxxx NAME NoteProperty string NAME=xxxxxxx POSITION ID NoteProperty string POSITION ID=KPT000999 PRIORITY # NoteProperty object PRIORITY #=null ROUTING NUMBER NoteProperty string ROUTING NUMBER=xxxxxx TAX ID NoteProperty string TAX ID=xxxxxxx workerid NoteProperty System.String workerid=999