Open FISHMANPET opened 4 years ago
Describe the bug Take this sample code:
$thing1 = [pscustomobject]@{ thing1 = 'thing' thing2 = 'thing again' } $thing2 = [pscustomobject]@{ thing2 = 'thing the third' thing1 = 'criss cross' } $things = @( $thing1 $thing2 ) Export-GSSheet -SpreadsheetId $sheetid -Array $things -SheetName $sheetname
When printing $things to the terminal, Powershell can figure out that the objects are in a different order, but still display the object properly:
$things
thing1 thing2 ------ ------ thing thing again criss cross thing the third
Exporting that object to CSV with Export-CSV also properly puts criss cross in the first column.
Export-CSV
criss cross
However, Export-GSSheet gets confused and puts thing the third in the thing1 column and criss cross in the thing2 column.
Export-GSSheet
thing the third
thing1
thing2
Expected behavior criss cross should show up under thing1 not thing2
Describe the bug Take this sample code:
When printing
$things
to the terminal, Powershell can figure out that the objects are in a different order, but still display the object properly:Exporting that object to CSV with
Export-CSV
also properly putscriss cross
in the first column.However,
Export-GSSheet
gets confused and putsthing the third
in thething1
column andcriss cross
in thething2
column.Expected behavior
criss cross
should show up underthing1
notthing2