Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import-Excel not importing date columns #115

Closed
kbkaehn opened this issue Aug 12, 2016 · 1 comment
Closed

Import-Excel not importing date columns #115

kbkaehn opened this issue Aug 12, 2016 · 1 comment
Labels

Comments

@kbkaehn
Copy link

kbkaehn commented Aug 12, 2016

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

@dfinke dfinke added the bug label Aug 12, 2016
@dfinke dfinke closed this as completed in 3db1473 Aug 12, 2016
@dfinke
Copy link
Owner

dfinke commented Aug 12, 2016

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')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants