# Sparklines

DsExcel Templates allows you to add sparklines in Excel template layout which are displayed in generated Excel reports.

## Content





DsExcel supports adding sparklines in template layout, which are visible in the Excel report generated after processing the template.

Follow the steps mentioned below to add a sparkline in template layout and configure its data to template cells:

You can also download the [Excel template layout](https://cdn.mescius.io/document-site-files/images/dd59ea42-cd61-4fa6-a018-6231c2a9c598/templates/templateworkwithsparkline[template].xlsx) used in below example.

1.  Insert a sparkline in Excel's template layout by choosing **Menu** | **Insert** | **Sparklines**.
2.  In the "Create Sparklines" dialog box, choose a template cell as:
    
    *   Data Range - Data to be displayed by sparkline
    *   Location Range - Location where sparkline will be displayed<br />
    
    ![Sparkline](https://cdn.mescius.io/document-site-files/images/dd59ea42-cd61-4fa6-a018-6231c2a9c598/images/sparkline.png)

After DsExcel processes the template layout, the Excel report will look like below:

![Excel report output](https://cdn.mescius.io/document-site-files/images/dd59ea42-cd61-4fa6-a018-6231c2a9c598/images/spark_output.png) 

> !type=note
>
> **Note**: In Excel report, the sparkline whose data range and location range are in the same column is displayed as a 'vertical' sparkline, otherwise, as 'horizontal' sparkline.
