![]() ![]() When a file is selected in Explorer, some of the more important metadata properties are displayed in summary fashion along the bottom of the screen. There are actually two ways in Windows Vista to view metadata. “Oh, my! The rebels are attacking the metadata!”Īnyway, in the image that follows this paragraph, you see some of the metadata associated with an Excel spreadsheet. So what is all this stuff about Excel metadata anyway? It sounds like something from some space epic: invokemember("value",$binding::GetProperty,$null,$property,$null) Write-host -foreground blue "Value not found for $pn" invokemember("name",$binding::GetProperty,$null,$property,$null) $binding = "" -as įoreach($property in $workbook.BuiltInDocumentProperties) If you are a real geek (or geek at heart or geek wannabe), read on: $excel = New-Object -ComObject Excel.Application If you want to skip the details, here is the GetExcelMetaData.ps1 script. So I am very glad you wrote and asked this question because I believe it will be instructive for us all. The GetExcelMetaData.ps1 script that follows this paragraph took me two days to write, and in the end, I had to get help from my good friend and fellow Microsoftie Luis in Lisbon to solve a very perplexing problem with COM interop assemblies. This script took Greg probably about an hour (or less) to write. Wscript.Echo strProperty.Name
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |