You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+25-1
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,29 @@ This is a simple tool and maybe even naïve in its approach - it was hacked toge
17
17
18
18
Single-cell references in a formula sitting in cell `A3` like `=A1+A2` is considered a dependency between the node `A3` and the nodes `A2` and `A1`.
19
19
20
-
A range defined in a formula like `=SUM(B1:B200)` is semantically handled like a single reference or node in the tree and not 200 individual nodes in the graph.
20
+
```mermaid
21
+
graph TD
22
+
A1 --> A3
23
+
A2 --> A3
24
+
A3["=A1 + A2"]
25
+
```
26
+
27
+
A range defined in a formula like `=SUM(B1:B3)` is kept as a single node in the graph, but all the containing cells are expanded as dependencies of the range node.
28
+
29
+
So when a cell, `C1` contains `=SUM(B1:B3)` the graph will look like this:
30
+
31
+
```mermaid
32
+
33
+
graph TD
34
+
R -->B1
35
+
R -->B2
36
+
R -->B3
37
+
R["B1:B3"]
38
+
C1 --> R
39
+
40
+
C1["C1=SUM(B1:B3)"]
41
+
42
+
```
21
43
22
44
The way the graph is built is by iterating over all cells in the spreadsheet and extracting the references in the formula of each cell. The references are then added as edges in the graph.
Depending on the size of the spreadsheet you might want to adjust the plot configuration in the code to to make the graph more readable (remove labels, decrease widths and sizes etc)
42
64
65
+
In [graph_visualizer.py](graph_visualizer.py) you will find three configuration for small, medium and large graphs. You can adjust the configuration to your needs.
66
+
43
67
### Arguments
44
68
45
69
`--verbose` will dump formula cell contents during (more quiet)
0 commit comments