Build 3.5.0.58 of xlsgen adds the ability to create named ranges from table headers and rows automatically.
Let's consider the following data range :
| A | B | C | D | E |
1 | | | | | |
2 | | | | | |
3 | | TurnOver | Apples | Pears | Bananas |
4 | | Europe | 1000 | 800 | 1200 |
5 | | Asia | 1200 | 400 | 750 |
6 | | America | 1700 | 1200 | 1900 |
By doing
NewRange("B3:E6").CreateNames(true, true, false, false)
,
xlsgen automatically creates the following named ranges based on the data range headers and columns :
- Apples = C4:C6
- Pears = D4:D6
- Bananas = E4:E6
- Europe = C4:E4
- Asia = C5:E5
- America = C6:E6
- TurnOver = C4:E6