Just continuing down the path which Ken helped put me on, I thought
I'd share my little routine which uses vbscript to get the Names in an
Excel workbook and the ranges to which they refer:

function getXLNames
  put "Dim ObjXL,tRetVal,tName" & cr & \
        "Set ObjXL = GetObject(," & q("Excel.Application") & ")" into tScript
  put cr& "For Each tName In ObjXL.ActiveWorkbook.Names" & cr & \
        "tRetVal = tRetVal & tName.Name  & tName.RefersTo & vbCrLf" &
cr & "Next" after tScript
  put cr & "tRetVal = Left(tRetVal,Len(tRetVal) - 2)" & cr & \
        "WScript.Echo tRetVal" after tScript
  put tmpfolder&"/VBSTemp.vbs" into tFile  --tmpfolder is a global
var holding a path
  put tScript into url("file:" & tFile)
  set the hideconsolewindows to true
  get shell("cscript.exe //nologo" && tFile)
  send "delete file" && q(tFile) to me in 1 second
  if char -1 of it is cr then delete char -1 of it
  return it
end getXLNames
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to