# Load only first line of file

**URL:** <https://discourse.processing.org/t/load-only-first-line-of-file/36058>\
**Category:** Coding Questions\
**Created:** [March 31, 2022, 8:17pm UTC](https://discourse.processing.org/t/load-only-first-line-of-file/36058 "2022-03-31T20:17:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ybr](https://avatars.discourse-cdn.com/v4/letter/y/df788c/32.png) [@ybr](https://discourse.processing.org/u/ybr)\
**Post date:** [March 31, 2022, 8:17pm UTC](https://discourse.processing.org/t/load-only-first-line-of-file/36058/1 "2022-03-31T20:17:46Z")

</div>

Hi!

I have a large CSV file and loading using loadTable() takes a lot of time. For my application, at first I only need the first line of the file. Is there a way to quickly load the first line of the file without loading the full file?

Thanks!

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [March 31, 2022, 8:32pm UTC](https://discourse.processing.org/t/load-only-first-line-of-file/36058/2 "2022-03-31T20:32:20Z")

</div>

> **[Reference](https://processing.org/reference/createReader_.html)**
>
> Creates a BufferedReader object that can be used to read files line-by-line as individual String objects. This is the complement to the createWriter() function. For more informati…

> **[Reference](https://processing.org/reference/BufferedReader.html)**
>
> A BufferedReader object is used to read files line-by-line as individual String objects. Starting with Processing release 0134, all files loaded and saved by the Processing …

---

<div class="post-metadata">

**Author:** ![ybr](https://avatars.discourse-cdn.com/v4/letter/y/df788c/32.png) [@ybr](https://discourse.processing.org/u/ybr)\
**Post date:** [March 31, 2022, 8:39pm UTC](https://discourse.processing.org/t/load-only-first-line-of-file/36058/3 "2022-03-31T20:39:57Z")

</div>

Thanks! Going to try that 🙂
