Skip to content

Commit e95f766

Browse files
committed
Update Readme
1 parent d92fc38 commit e95f766

File tree

1 file changed

+37
-18
lines changed

1 file changed

+37
-18
lines changed

README.md

+37-18
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ Python script to visualize dependencies between cells in Excel spreadsheets.
88

99
Meant as a tool to visualize and understand the complexity of Excel spreadsheets.
1010

11-
Will generate a graph of the dependencies between cells in an Excel spreadsheet. The graph is generated using the `networkx` library (<https://networkx.org/>) and is visualized using `matplotlib`.
11+
Will generate a graph of the dependencies between cells in an Excel spreadsheet. Data extracted with `openpyxl` (\The graph is generated using the `networkx` library (<https://networkx.org/>) and is visualized using `matplotlib`.
12+
13+
This is a simple tool and does not
1214

1315
## Definitions
1416

@@ -18,7 +20,7 @@ A range defined in a formula like `=SUM(B1:B200)` is semantically handled like a
1820

1921
<br clear="right"/>
2022

21-
## Install
23+
## Installation
2224

2325
```bash
2426

@@ -27,32 +29,49 @@ source venv/bin/activate
2729
pip install -r requirements.txt
2830
```
2931

30-
## Run
32+
## Usage
3133

3234
```bash
33-
python graphbuilder.py <path_to_excel_file>
35+
python graphbuilder.py <path_to_excel_file> [--verbose] [--no-visualize] [--keep-direction]
3436
```
3537

3638
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 widhts and sizes etc)
3739

40+
### Arguments
41+
42+
`--verbose` will dump formula cell contents during (more quiet)
43+
`--no-visualize` will skip the visualization step and only print the summary (faster)
44+
`--keep-direction` will keep the direction of the graph as it is in the excel file, otherwise it will be simplified to an undirected graph (slower)
45+
3846
## Sample output
3947

48+
The following is the output of running the script on the provided `Book1.xlsx` file.
49+
4050
```bash
4151
=== Dependency Graph Summary ===
42-
Number of nodes (cells): 16
43-
Number of edges (dependencies): 17
44-
45-
Nodes with the highest degree:
46-
Sheet1!B5: 4 dependencies
47-
Sheet1!B12: 3 dependencies
48-
Sheet1!B17: 3 dependencies
49-
Sheet1!I21: 3 dependencies
50-
Sheet1!G22: 3 dependencies
51-
Sheet1!B22: 3 dependencies
52-
Sheet1!B28: 3 dependencies
53-
Sheet1!G19: 2 dependencies
54-
Sheet1!B35: 2 dependencies
55-
Sheet3!A2:A11: 2 dependencies
52+
Cell/Node count 50
53+
Dependency count 60
54+
55+
=== Nodes with the highest degree ===
56+
Range!F1 10
57+
Base!B5 4
58+
Base!B12 3
59+
Base!B17 3
60+
Base!I21 3
61+
Base!G22 3
62+
Base!B22 3
63+
Base!B28 3
64+
Range!B2 3
65+
Range!B3 3
66+
67+
=== Formula functions by count ===
68+
SUM 3
69+
POWER 1
70+
71+
Visualizing the graph of dependencies.
72+
This might take a while...
73+
74+
Graph visualization saved to images/.\Book1.xlsx.png
5675
```
5776

5877
## Sample plot

0 commit comments

Comments
 (0)