
Contents |
Insert Sparklines...
Insert sparklines into worksheet cells
1. insertSparklines irng:=col(2) orng:=col(3)[1];
2. insertSparklines irng:=col(2):col(4) name:=0 c2:=min c3:=max label:=0 size:=double orng:=col(5)[1];
3. insertSparklines irng:=col(2):col(4) name:=0 c2:=mean keepAspect:=1 endpts:=0 orng:=col(5)[5] xfrom:=0 xto:=500 yfrom:=0 yto:=200;
| Display Name | Variable Name | I/O and Type | Default Value | Description |
|---|---|---|---|---|
| Data Columns | irng |
Input Range | |
Specifies the data columns for the sparklines. |
| Insert Direction | insertDir |
Input int | |
Specifies the direction of the inserted cells.
|
| Long Name in 1st Column | name |
Input int | |
Specifies whether or not to show the long names of the data columns in the first column. |
| Add 3rd Column | c2 |
Input int | |
Specifies whether or not to add a third column. If this column will be added, user can further specify its content.
|
| Add 4th Column | c3 |
Input int | |
Specifies whether or not to add a fourth column. If this column will be added, user can further specify its content.
|
| Add 5th Column | c4 |
Input int | |
Specifies whether or not to add a fifth column. If this column will be added, user can further specify its content.
|
| Add 6th Column | c5 |
Input int | |
Specifies whether or not to add a sixth column. If this column will be added, user can further specify its content.
|
| Graph Template | template |
Input string | |
Specifies the graph template used to generate the sparklines. |
| Hide Annotations | label |
Input int | |
Specifies whether or not to hide the annotation (text labels and legend) on the sparklines. |
| Keep Aspect Ratio | keepAspect |
Input int | |
Specifies whether or not to keep the aspect ratio of the sparklines. |
| Sparkline Cell Height | size |
Input int | |
Specifies the height of the cells, into which the sparklines are inserted.
|
| Show First and Last Points | endpts |
Input int | |
Specifies whether to show the first and last points for the sparklines. |
| Top Left Cell | orng |
Output Range | |
Specifies the top left cell (the first cell) to insert. See the syntax here. |
| X From | xfrom |
Input double | |
Specifies the first X scale value for the sparklines. |
| X To | xto |
Input double | |
Specifies the last X scale value for the sparklines. |
| Y From | yfrom |
Input double | |
Specifies the first Y scale value for the sparklines. |
| Y To | yto |
Input double | |
Specifies the last Y scale value for the sparklines. |
This X-Function plots the sparklines for a range of data columns and inserts them into specified worksheet cells. It can also calculate the mean value, minimum value and maximum value of each data column. You can use it to generate a simple report for the data columns.
We can run it in script. And we can click the right key to open the popup menu, select Insert sparklines item.