Using PowerShell, it is easy enough to create, say, an instance of the Excel Application class and start manipulating it:
$app = New-Object -ComObject "Excel.Application"
However, if I need to use the constants like xlDoubleQuote or xlDelimited - it seems like I am forced to hard code them. I would really like to be able to do something like:
$constants = New-Object -ComObject "Excel.Constants"
$constants.xlDoubleQuote
And see that it would return the value of 1. Unfortunately I can't create an instance of an enumeration, and there doesn't seem to be a way to reference it like you would a normal .NET class library:
[Excel.Constants]::xlDoubleQuote
Is there some way to dynamically import that enumeration into PowerShell? Maybe through the managed libraries rather than COM?