I'm reading some value from XML:
<DocumentSetNumber>20151027301060001</DocumentSetNumber>
$DSN = $xml.metaBI.DocumentSetNumber
and then writing to Excel using PowerShell:
$ExcelWorkSheet.Cells.Item($Row,1).Value2 = $DSN
But in Excel I'm getting this number: 2.0151E+16
If I change Excel format I can get this: 20151027301060000
It's not the same number, and I need to get exactly the same.
I tried to play with Excel formats and also use Tostring() on variable, but without luck.
What also can I try?
PS. If I copy and paste this value manually it works only I use
match destination formatting
option in Excel.
How I can set this option from PowerShell?