Skip to content

Commit

Permalink
Update main API documentation with options
Browse files Browse the repository at this point in the history
  • Loading branch information
Tricote committed Sep 17, 2017
1 parent 75b4c8f commit a25373d
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 28 deletions.
29 changes: 2 additions & 27 deletions config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,6 @@
# and its dependencies with the aid of the Mix.Config module.
use Mix.Config

# This configuration is loaded before any dependency and is restricted
# to this project. If another project depends on this project, this
# file won't be loaded nor affect the parent project. For this reason,
# if you want to provide default values for your application for
# 3rd-party users, it should be done in your "mix.exs" file.

# You can configure for your application as:
#
# config :xlsxir, key: :value
#
# And access this configuration in your application as:
#
# Application.get_env(:xlsxir, :key)
#
# Or configure a 3rd-party app:
#
# config :logger, level: :info
#

# It is also possible to import configuration files, relative to this
# directory. For example, you can emulate configuration per environment
# by uncommenting the line below and defining dev.exs, test.exs and such.
# Configuration from the imported file will override the ones defined
# here (which is why it is important to import them last).
#
# import_config "#{Mix.env}.exs"

# when extracting to file, files will be extracted
# in a sub directory in the `:extract_base_dir` directory.
# config :xlsxir, extract_base_dir: "temp"
26 changes: 26 additions & 0 deletions lib/xlsxir.ex
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@ defmodule Xlsxir do
- `index` - index of worksheet from within the Excel workbook to be parsed (zero-based index)
- `timer` - boolean flag that tracks extraction process time and returns it when set to `true`. Default value is `false`.
## Options
- `:max_rows` - the number of rows to fetch from within the worksheet
- `:extract_to` - Specify how the `.xlsx` content (i.e. sharedStrings.xml,
style.xml and worksheets xml files) will be be extracted before being parsed.
`:memory` will extract files to memory, and `:file` to files in the file system
- `:extract_base_dir` - when extracting to file, files will be extracted
in a sub directory in the `:extract_base_dir` directory. Defaults to
`Application.get_env(:xlsxir, :extract_base_dir)` or "temp"
## Example
Extract first worksheet in an example file named `test.xlsx` located in `./test/test_data`:
Expand Down Expand Up @@ -126,6 +135,14 @@ defmodule Xlsxir do
- `index` - index of worksheet from within the Excel workbook to be parsed (zero-based index)
- `rows` - the number of rows to fetch from within the specified worksheet
## Options
- `:extract_to` - Specify how the `.xlsx` content (i.e. sharedStrings.xml,
style.xml and worksheets xml files) will be be extracted before being parsed.
`:memory` will extract files to memory, and `:file` to files in the file system
- `:extract_base_dir` - when extracting to file, files will be extracted
in a sub directory in the `:extract_base_dir` directory. Defaults to
`Application.get_env(:xlsxir, :extract_base_dir)` or "temp"
## Example
Peek at the first 10 rows of the 9th worksheet in an example file named `test.xlsx` located in `./test/test_data`:
Expand Down Expand Up @@ -154,6 +171,15 @@ defmodule Xlsxir do
- `index` - index of worksheet from within the Excel workbook to be parsed (zero-based index)
- `timer` - boolean flag that tracts extraction process time and returns it when set to `true`. Defalut value is `false`.
## Options
- `:max_rows` - the number of rows to fetch from within the worksheets
- `:extract_to` - Specify how the `.xlsx` content (i.e. sharedStrings.xml,
style.xml and worksheets xml files) will be be extracted before being parsed.
`:memory` will extract files to memory, and `:file` to files in the file system
- `:extract_base_dir` - when extracting to file, files will be extracted
in a sub directory in the `:extract_base_dir` directory. Defaults to
`Application.get_env(:xlsxir, :extract_base_dir)` or "temp"
## Example
Extract first worksheet in an example file named `test.xlsx` located in `./test/test_data`:
Expand Down
2 changes: 1 addition & 1 deletion lib/xlsxir/xlsx_file.ex
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ defmodule Xlsxir.XlsxFile do
## Options
- `:max_rows` - the number of rows to fetch from within the worksheet
- `:extract_to` - Specify where how the `.xlsx` content (i.e. sharedStrings.xml,
- `:extract_to` - Specify how the `.xlsx` content (i.e. sharedStrings.xml,
style.xml and worksheets xml files) will be be extracted before being parsed.
`:memory` will extract files to memory, and `:file` to files in the file system
- `:extract_base_dir` - when extracting to file, files will be extracted
Expand Down

0 comments on commit a25373d

Please sign in to comment.