dfinke/ImportExcel

Import-Excel not importing date columns

kbkaehn opened this issue · 1 comments

Could you help me with this problem? I need to do manipulations on the data after it is imported based on the "Client Start" column (I stripped most all the other data so that I could send the file). The "Client Start" column is not being imported so I can't do it. Any ideas? The PS command I am using is:

$incfile = ".\Incdents-stripped.xlsx"
$IncTable = import-excel $IncFile -WorkSheetname "Critical Effects" | Where {`
($_.'Solution Type' -eq 'Soarian Financials - RHO')}
Incidents-stripped.xlsx

Thanks for reporting! I won't be pushing this to the gallery, you can grab it of this repo or update the ImportExcel.psm1 directly, a simple change.

Also, you may know this, for the date, it is stored as and Excel date time and you'll need to convert it like this:

$data=import-excel .\Incidents-stripped.xlsx -WorkSheetname "critical effects" 
[datetime]::FromOADate($data[0].'Client Start')