<commit_before># Creek - Stream parser for large Excel (xlsx and xlsm) files.

Creek is a Ruby gem that provides a fast, simple and efficient method of parsing large Excel (xlsx and xlsm) files.


## Installation

Creek can be used from the command line or as part of a Ruby web framework. To install the gem using terminal, run the following command:

```
gem install creek
```

To use it in Rails, add this line to your Gemfile:

```ruby
gem 'creek'
```

## Basic Usage
Creek can simply parse an Excel file by looping through the rows enumerator:

```ruby
require 'creek'
creek = Creek::Book.new 'specs/fixtures/sample.xlsx'
sheet= creek.sheets[0]

sheet.rows.each do |row|
  puts row # => {"A1"=>"Content 1", "B1"=>nil, C1"=>nil, "D1"=>"Content 3"}
end

sheet.rows_with_meta_data.each do |row|
  puts row # => {"collapsed"=>"false", "customFormat"=>"false", "customHeight"=>"true", "hidden"=>"false", "ht"=>"12.1", "outlineLevel"=>"0", "r"=>"1", "cells"=>{"A1"=>"Content 1", "B1"=>nil, C1"=>nil, "D1"=>"Content 3"}}
end

sheet.state   # => 'visible'
sheet.name    # => 'Sheet1'
sheet.rid     # => 'rId2'
```

## Filename considerations
By default, Creek will ensure that the file extension is either *.xlsx or *.xlsm, but this check can be circumvented as needed:

```ruby<commit_msg>Update README.md: additional space symbol. (#50)<commit_after># Creek - Stream parser for large Excel (xlsx and xlsm) files.

Creek is a Ruby gem that provides a fast, simple and efficient method of parsing large Excel (xlsx and xlsm) files.


## Installation

Creek can be used from the command line or as part of a Ruby web framework. To install the gem using terminal, run the following command:

```
gem install creek
```

To use it in Rails, add this line to your Gemfile:

```ruby
gem 'creek'
```

## Basic Usage
Creek can simply parse an Excel file by looping through the rows enumerator:

```ruby
require 'creek'
creek = Creek::Book.new 'specs/fixtures/sample.xlsx'
sheet = creek.sheets[0]

sheet.rows.each do |row|
  puts row # => {"A1"=>"Content 1", "B1"=>nil, C1"=>nil, "D1"=>"Content 3"}
end

sheet.rows_with_meta_data.each do |row|
  puts row # => {"collapsed"=>"false", "customFormat"=>"false", "customHeight"=>"true", "hidden"=>"false", "ht"=>"12.1", "outlineLevel"=>"0", "r"=>"1", "cells"=>{"A1"=>"Content 1", "B1"=>nil, C1"=>nil, "D1"=>"Content 3"}}
end

sheet.state   # => 'visible'
sheet.name    # => 'Sheet1'
sheet.rid     # => 'rId2'
```

## Filename considerations
By default, Creek will ensure that the file extension is either *.xlsx or *.xlsm, but this check can be circumvented as needed:

```ruby
{'fraction_non_alphanumeric': 0.15938697318007664, 'fraction_numerical': 0.016091954022988506, 'mean_word_length': 4.688453159041394, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 45, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4241634', 'n_tokens_mistral': 959, 'n_tokens_neox': 901, 'n_words': 326}