Thread: Value Metadata
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Peter T Peter T is offline
external usenet poster
 
Posts: 5,600
Default Value Metadata

Curious!

"2.2.4 Metadata
Metadata is additional data associated with a particular cell or its
content. Metadata is recorded in BIFF8 for future extensibility purpose
only."

I haven't come across this but I assume the way to check in VBA is by
examining the formula you can see in the input bar. I can't test but try
this -

Function HasMetadata(rCell As Range) As Boolean
With rCell
If .HasFormula Then
' case sensitive
HasMetadata = Left$(.Formula, 20) = "=_xlfn.COMPOUNDVALUE"
End If
End With
End Function

I'd be interested to see the relevant 2007 XML

Regards,
Peter T


"IgorM" wrote in message
...
Hi

How can I check (using VBA) if a cell has some metadata associated (as
described he http://msdn.microsoft.com/en-us/library/dd953161.aspx).
I ask because I have an xlsx file with data that when opened in Excel 2007
shows values only. But when I save the same file in xls format and open it
in Excel 2003 it displays value in the cell but in formula box Excel shows
_xlfn.COMPOUNDVALUE(20) for instance.

Thanks
IgorM