# Number of rows in an Excel file

**URL:** <https://discuss.elastic.co/t/number-of-rows-in-an-excel-file/238406>\
**Category:** Logstash\
**Created:** [June 24, 2020, 8:48am UTC](https://discuss.elastic.co/t/number-of-rows-in-an-excel-file/238406 "2020-06-24T08:48:15Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![souma](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/souma/32/44739_2.png) [@souma](https://discuss.elastic.co/u/souma)\
**Post date:** [June 24, 2020, 8:48am UTC](https://discuss.elastic.co/t/number-of-rows-in-an-excel-file/238406/1 "2020-06-24T08:48:15Z")

</div>

Hey guys,  
i have a stack of Excel files, and i use Logstash to send it to Es.  
All i want is that each time i send a file to Es, it(Logstash config file) count the number of rows and save it in a variable.  
Is there any way to do it?

---

<div class="post-metadata">

**Author:** ![NerdSec](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nerdsec/32/22056_2.png) [@NerdSec](https://discuss.elastic.co/u/NerdSec)\
**Post date:** [June 24, 2020, 9:10am UTC](https://discuss.elastic.co/t/number-of-rows-in-an-excel-file/238406/2 "2020-06-24T09:10:37Z")

</div>

Yes, [it is possible](https://www.elastic.co/guide/en/logstash/current/plugins-filters-aggregate.html). But why would you want it in a variable?

---

<div class="post-metadata">

**Author:** ![souma](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/souma/32/44739_2.png) [@souma](https://discuss.elastic.co/u/souma)\
**Post date:** [June 25, 2020, 12:16pm UTC](https://discuss.elastic.co/t/number-of-rows-in-an-excel-file/238406/3 "2020-06-25T12:16:33Z")

</div>

Hey @NerdSec,  
thank's for your answer.  
I want to put it in a variable so i could use it in some calculations (Percentage...)  
I will consult the link you gave to me and i hope it solves my problem.  
Thank's again 😉

---

<div class="post-metadata">

**Author:** ![NerdSec](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nerdsec/32/22056_2.png) [@NerdSec](https://discuss.elastic.co/u/NerdSec)\
**Post date:** [June 26, 2020, 1:09am UTC](https://discuss.elastic.co/t/number-of-rows-in-an-excel-file/238406/4 "2020-06-26T01:09:39Z")

</div>

I would recommend that you index all the data in Elasticsearch, and then use the Aggregation functions in Elasticsearch or the Kibana visualizations to showcase your data. 🙂

---

<div class="post-metadata">

**Author:** ![souma](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/souma/32/44739_2.png) [@souma](https://discuss.elastic.co/u/souma)\
**Post date:** [July 2, 2020, 10:58am UTC](https://discuss.elastic.co/t/number-of-rows-in-an-excel-file/238406/5 "2020-07-02T10:58:15Z")

</div>

Hey @NerdSec,  
thank's for your advise.  
But i'm still a beginner using these stack, could you please explain more how could i use the Aggregation functions in Kibana?

---

<div class="post-metadata">

**Author:** ![NerdSec](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nerdsec/32/22056_2.png) [@NerdSec](https://discuss.elastic.co/u/NerdSec)\
**Post date:** [July 3, 2020, 1:01pm UTC](https://discuss.elastic.co/t/number-of-rows-in-an-excel-file/238406/6 "2020-07-03T13:01:46Z")

</div>

No worries souma, here is an easy to go through tutorial:  
[https://www.elastic.co/guide/en/kibana/current/tutorial-visualizing.html](https://www.elastic.co/guide/en/kibana/current/tutorial-visualizing.html)

The use case will govern what type of visualization you create. Have a look at lens too, you will like it:

> **[Kibana Lens](https://www.elastic.co/kibana/kibana-lens)**
>
> Bring instant clarity to your data with the Kibana Lens UI. Drag and drop Elasticsearch field types for easy data visualization — no prior Kibana experience required.

[![](https://us1.discourse-cdn.com/elastic/original/3X/9/b/9b524a29cfa60fd365227d6d36ba604d30860029.jpeg "Kibana Lens Overview (Beta): An easy, intuitive way to visualize Elasticsearch data") ](https://www.youtube.com/watch?v=6U7uoCyabcg)

> **[Create visualizations with Lens | Kibana Guide \[8.7\] | Elastic](https://www.elastic.co/guide/en/kibana/current/lens.html)**
>
> Consider the production components that are used to generate reports.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 31, 2020, 1:01pm UTC](https://discuss.elastic.co/t/number-of-rows-in-an-excel-file/238406/7 "2020-07-31T13:01:48Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
