How can I change the format of a column to either date or currency from
powershell?
I assume it is something like this:
$worksheet.Column(X,Y).property
I would alos like to know where to locate any documentation on how to
integrate PS and Excel.
Thanks in advance!
http://www.microsoft.com/technet/scriptcenter/resources/qanda/sept06/hey0908.mspx
- Larry
For example in my current script I am setting the column width using:
$worksheet.columns.item('b').columnWidth = 15
So there must be a property that I can set to change the format to
"currency" or "date" but I just don't know what it is. When I open a new
workbook via the command line I can type $worksheet.columns.item('b'). and
hit tab but I get nothing. So I don't even know where to look.
I just recorded a macro and hacked the code from that. I was not aware that
you could do that.
http://msdn.microsoft.com/en-us/library/wss56bz7%28VS.80%29.aspx
http://msdn.microsoft.com/en-us/library/aa188489%28office.10%29.aspx
I don't know if even those are comprehensive.
- Larry
You can find some basic stuff at my Blog.
http://olddogsblog.spaces.live.com/default.aspx?wa=wsignin1.0&sa=808626389
Go all the way back to August of last year for my Excel Cookbook.
Mike