![]() |
|
|||||||
| Notices |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 | |
|
Newbie
Join Date: Jun 2009
Age: 24
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
![]() OS:
|
Hi all!
May problem is: I have a scirpt, that read out the data from an excel file: Quote:
How can I solve this problem? Or how can I do, that the sript read out the cell as a string? Thx the help in advance! Koky |
|
|
|
|
|
|
#2 |
|
ƒ(ψ)=ΘΊΧφ
![]() |
Re: How to get a date format cell as string from excel with PowerShell?
Are you sure 2009.06.15 is returned as 39979 ?? it's coming 16th June for me, not 15th.
You can export the excel in csv format and then read all values in string : read excel file - PowerShellCommunity.org - Windows PowerShell Discussion Forums - Using PowerShell - General PowerShell otherwise you can try this : $d = Get-Date "01/01/1900" $add = ([long]$sh.Cells.item($row,$col).formulaLocal) - 1 [string]$d.AddDays($add)
__________________
Please don't click here |
|
|
|
|
|
#3 |
|
Newbie
Join Date: Jun 2009
Age: 24
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
![]() OS:
|
Re: How to get a date format cell as string from excel with PowerShell?
Thank you helping!
Yes, I'm sure that the date is: 2009.06.15, and the returned value is: 39979 Thx the helping again. It's working and seems good to me! Koky |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
< Windows Help - MS Office Help - Hardware Support >
| New To Site? | Need Help? |