View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Daffo Daffo is offline
external usenet poster
 
Posts: 13
Default how to build Dependency Trees in Excel

Hi Mike , thank you for replying.
I have tried to get the Collection of Dependent Cells in a worksheet
and also List of Formula Cells in the sheet using VBA macro. It works
fine when i use macro. But when i try to accomplish the same using
C#... i am able to get just the count of the Dependent Cells and
Formula Cells in a sheet.
I collect the Collection of Dependents in Excel.Range Variable. lik
this..
Excel.Range rg= Sheet1.UsedRange.Dependents

but i am nt able to access each item from the collection of Dependent
Cells.

Well using a macro i get to access each dependent cell lik this..
Dim DCelCltn As Range
Dim FCell As Range
Set DCelCltn = ThisWorkbook.ActiveSheet.UsedRange.Dependents
For Each FCell In DCelCltn
MsgBox FCell.Formula
MsgBox FCell.Address
Next

How to accomplish the same using C#?

With Regards
Daffo

Mike wrote:
Try Tools - Formula auditing

" wrote:

Hi i wanted to know where to find information like algorithms,
procedures, strategies regarding the Excel dependency Trees. (I donot
need it for recalculation.)
I need to build a dependency tree to collect values from the cells
that have changed due to external links/ formula. Although the
documentation for SheetChange event specifies that the event fires for
cell change due to external link.. it does nt. SheetChange event fires
only for Cells that change due to manual entry.

So when a Cell say A1!Sheet1 that acts as input to a few other Cells(
cells in other Sheets) in the workbook changes, i need to build a
dependency tree which gives all the cells in a workbook that get
effected because of
A1!Sheet1.

With Regards
daffo