Skip to content

Commit

Permalink
Implemented Xlsxir.get_mda/0
Browse files Browse the repository at this point in the history
  • Loading branch information
jsonkenl committed May 19, 2016
1 parent cd98fc6 commit 133331c
Show file tree
Hide file tree
Showing 24 changed files with 183 additions and 83 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

## 1.2.0

- Added `Xlsxir` access function `Xlsxir.get_mda/0` that accesses `:worksheet` ETS table and returns an indexed map which functions like a multi-dimensional array in other languages.

## 1.1.0

- Modified the way rows are saved to the `:worksheet` ETS table. Replaced the generic index with the actual row number to allow for performance imporovement of supporting `Xlsxir` access functions.
Expand Down
4 changes: 3 additions & 1 deletion OVERVIEW.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ You can add Xlsxir as a dependancy to your Elixir project via the Hex package ma

```elixir
def deps do
[ {:xlsxir, "~> 1.1.0"} ]
[ {:xlsxir, "~> 1.2"} ]
end
```

Expand Down Expand Up @@ -42,13 +42,15 @@ The extracted worksheet data can be accessed using any of the following function
```elixir
Xlsxir.get_list
Xlsxir.get_map
Xlsxir.get_mda
Xlsxir.get_cell(cell_ref)
Xlsxir.get_row(row_num)
Xlsxir.get_col(col_ltr)
Xlsxir.get_info(num_type)
```
`Xlsxir.get_list/0` returns entire worksheet in a list of row lists (i.e. `[[row 1 values], ...]`)<br/>
`Xlsxir.get_map/0` returns entire worksheet in a map of cell names and values (i.e. `%{"A1" => value, ...}`)<br/>
`Xlsxir.get_mda/0` returns entire worksheet in an indexed map which can be accessed like a multi-dimensional array (i.e. `some_var[0][0]` for cell "A1")<br/>
`Xlsxir.get_cell/1` returns value of specified cell (i.e. `"A1"` returns value contained in cell A1)<br/>
`Xlsxir.get_row/1` returns values of specified row (i.e. `1` returns the first row of data)<br/>
`Xlsxir.get_col/1` returns values of specified column (i.e. `"A"` returns the first column of data)<br/>
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ You can add Xlsxir as a dependancy to your Elixir project via the Hex package ma

```elixir
def deps do
[ {:xlsxir, "~> 1.1.0"} ]
[ {:xlsxir, "~> 1.2"} ]
end
```

Expand Down Expand Up @@ -42,13 +42,15 @@ The extracted worksheet data can be accessed using any of the following function
```elixir
Xlsxir.get_list
Xlsxir.get_map
Xlsxir.get_mda
Xlsxir.get_cell(cell_ref)
Xlsxir.get_row(row_num)
Xlsxir.get_col(col_ltr)
Xlsxir.get_info(num_type)
```
`Xlsxir.get_list/0` returns entire worksheet in a list of row lists (i.e. `[[row 1 values], ...]`)<br/>
`Xlsxir.get_map/0` returns entire worksheet in a map of cell names and values (i.e. `%{"A1" => value, ...}`)<br/>
`Xlsxir.get_mda/0` returns entire worksheet in an indexed map which can be accessed like a multi-dimensional array (i.e. `some_var[0][0]` for cell "A1")<br/>
`Xlsxir.get_cell/1` returns value of specified cell (i.e. `"A1"` returns value contained in cell A1)<br/>
`Xlsxir.get_row/1` returns values of specified row (i.e. `1` returns the first row of data)<br/>
`Xlsxir.get_col/1` returns values of specified column (i.e. `"A"` returns the first column of data)<br/>
Expand Down
4 changes: 2 additions & 2 deletions doc/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="ExDoc v0.11.4">
<title>404 – Xlsxir v1.1.0</title>
<title>404 – Xlsxir v1.2.0</title>
<link rel="stylesheet" href="dist/app-1e374caa3d.css" />
<script src="dist/sidebar_items.js"></script>
</head>
Expand All @@ -27,7 +27,7 @@ <h1 class="sidebar-projectName">
Xlsxir
</h1>
<h2 class="sidebar-projectVersion">
v1.1.0
v1.2.0
</h2>
</div>

Expand Down
6 changes: 3 additions & 3 deletions doc/Xlsxir.ConvertDate.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="ExDoc v0.11.4">
<title>Xlsxir.ConvertDate – Xlsxir v1.1.0</title>
<title>Xlsxir.ConvertDate – Xlsxir v1.2.0</title>
<link rel="stylesheet" href="dist/app-1e374caa3d.css" />
<script src="dist/sidebar_items.js"></script>
</head>
Expand All @@ -27,7 +27,7 @@ <h1 class="sidebar-projectName">
Xlsxir
</h1>
<h2 class="sidebar-projectVersion">
v1.1.0
v1.2.0
</h2>
</div>

Expand Down Expand Up @@ -59,7 +59,7 @@ <h2 class="sidebar-projectVersion">


<h1>
<small class="visible-xs">Xlsxir v1.1.0</small>
<small class="visible-xs">Xlsxir v1.2.0</small>
Xlsxir.ConvertDate


Expand Down
6 changes: 3 additions & 3 deletions doc/Xlsxir.Index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="ExDoc v0.11.4">
<title>Xlsxir.Index – Xlsxir v1.1.0</title>
<title>Xlsxir.Index – Xlsxir v1.2.0</title>
<link rel="stylesheet" href="dist/app-1e374caa3d.css" />
<script src="dist/sidebar_items.js"></script>
</head>
Expand All @@ -27,7 +27,7 @@ <h1 class="sidebar-projectName">
Xlsxir
</h1>
<h2 class="sidebar-projectVersion">
v1.1.0
v1.2.0
</h2>
</div>

Expand Down Expand Up @@ -59,7 +59,7 @@ <h2 class="sidebar-projectVersion">


<h1>
<small class="visible-xs">Xlsxir v1.1.0</small>
<small class="visible-xs">Xlsxir v1.2.0</small>
Xlsxir.Index


Expand Down
6 changes: 3 additions & 3 deletions doc/Xlsxir.ParseString.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="ExDoc v0.11.4">
<title>Xlsxir.ParseString – Xlsxir v1.1.0</title>
<title>Xlsxir.ParseString – Xlsxir v1.2.0</title>
<link rel="stylesheet" href="dist/app-1e374caa3d.css" />
<script src="dist/sidebar_items.js"></script>
</head>
Expand All @@ -27,7 +27,7 @@ <h1 class="sidebar-projectName">
Xlsxir
</h1>
<h2 class="sidebar-projectVersion">
v1.1.0
v1.2.0
</h2>
</div>

Expand Down Expand Up @@ -59,7 +59,7 @@ <h2 class="sidebar-projectVersion">


<h1>
<small class="visible-xs">Xlsxir v1.1.0</small>
<small class="visible-xs">Xlsxir v1.2.0</small>
Xlsxir.ParseString


Expand Down
6 changes: 3 additions & 3 deletions doc/Xlsxir.ParseStyle.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="ExDoc v0.11.4">
<title>Xlsxir.ParseStyle – Xlsxir v1.1.0</title>
<title>Xlsxir.ParseStyle – Xlsxir v1.2.0</title>
<link rel="stylesheet" href="dist/app-1e374caa3d.css" />
<script src="dist/sidebar_items.js"></script>
</head>
Expand All @@ -27,7 +27,7 @@ <h1 class="sidebar-projectName">
Xlsxir
</h1>
<h2 class="sidebar-projectVersion">
v1.1.0
v1.2.0
</h2>
</div>

Expand Down Expand Up @@ -59,7 +59,7 @@ <h2 class="sidebar-projectVersion">


<h1>
<small class="visible-xs">Xlsxir v1.1.0</small>
<small class="visible-xs">Xlsxir v1.2.0</small>
Xlsxir.ParseStyle


Expand Down
6 changes: 3 additions & 3 deletions doc/Xlsxir.ParseWorksheet.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="ExDoc v0.11.4">
<title>Xlsxir.ParseWorksheet – Xlsxir v1.1.0</title>
<title>Xlsxir.ParseWorksheet – Xlsxir v1.2.0</title>
<link rel="stylesheet" href="dist/app-1e374caa3d.css" />
<script src="dist/sidebar_items.js"></script>
</head>
Expand All @@ -27,7 +27,7 @@ <h1 class="sidebar-projectName">
Xlsxir
</h1>
<h2 class="sidebar-projectVersion">
v1.1.0
v1.2.0
</h2>
</div>

Expand Down Expand Up @@ -59,7 +59,7 @@ <h2 class="sidebar-projectVersion">


<h1>
<small class="visible-xs">Xlsxir v1.1.0</small>
<small class="visible-xs">Xlsxir v1.2.0</small>
Xlsxir.ParseWorksheet


Expand Down
6 changes: 3 additions & 3 deletions doc/Xlsxir.SaxParser.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="ExDoc v0.11.4">
<title>Xlsxir.SaxParser – Xlsxir v1.1.0</title>
<title>Xlsxir.SaxParser – Xlsxir v1.2.0</title>
<link rel="stylesheet" href="dist/app-1e374caa3d.css" />
<script src="dist/sidebar_items.js"></script>
</head>
Expand All @@ -27,7 +27,7 @@ <h1 class="sidebar-projectName">
Xlsxir
</h1>
<h2 class="sidebar-projectVersion">
v1.1.0
v1.2.0
</h2>
</div>

Expand Down Expand Up @@ -59,7 +59,7 @@ <h2 class="sidebar-projectVersion">


<h1>
<small class="visible-xs">Xlsxir v1.1.0</small>
<small class="visible-xs">Xlsxir v1.2.0</small>
Xlsxir.SaxParser


Expand Down
6 changes: 3 additions & 3 deletions doc/Xlsxir.SharedString.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="ExDoc v0.11.4">
<title>Xlsxir.SharedString – Xlsxir v1.1.0</title>
<title>Xlsxir.SharedString – Xlsxir v1.2.0</title>
<link rel="stylesheet" href="dist/app-1e374caa3d.css" />
<script src="dist/sidebar_items.js"></script>
</head>
Expand All @@ -27,7 +27,7 @@ <h1 class="sidebar-projectName">
Xlsxir
</h1>
<h2 class="sidebar-projectVersion">
v1.1.0
v1.2.0
</h2>
</div>

Expand Down Expand Up @@ -59,7 +59,7 @@ <h2 class="sidebar-projectVersion">


<h1>
<small class="visible-xs">Xlsxir v1.1.0</small>
<small class="visible-xs">Xlsxir v1.2.0</small>
Xlsxir.SharedString


Expand Down
6 changes: 3 additions & 3 deletions doc/Xlsxir.Style.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="ExDoc v0.11.4">
<title>Xlsxir.Style – Xlsxir v1.1.0</title>
<title>Xlsxir.Style – Xlsxir v1.2.0</title>
<link rel="stylesheet" href="dist/app-1e374caa3d.css" />
<script src="dist/sidebar_items.js"></script>
</head>
Expand All @@ -27,7 +27,7 @@ <h1 class="sidebar-projectName">
Xlsxir
</h1>
<h2 class="sidebar-projectVersion">
v1.1.0
v1.2.0
</h2>
</div>

Expand Down Expand Up @@ -59,7 +59,7 @@ <h2 class="sidebar-projectVersion">


<h1>
<small class="visible-xs">Xlsxir v1.1.0</small>
<small class="visible-xs">Xlsxir v1.2.0</small>
Xlsxir.Style


Expand Down
6 changes: 3 additions & 3 deletions doc/Xlsxir.Timer.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="ExDoc v0.11.4">
<title>Xlsxir.Timer – Xlsxir v1.1.0</title>
<title>Xlsxir.Timer – Xlsxir v1.2.0</title>
<link rel="stylesheet" href="dist/app-1e374caa3d.css" />
<script src="dist/sidebar_items.js"></script>
</head>
Expand All @@ -27,7 +27,7 @@ <h1 class="sidebar-projectName">
Xlsxir
</h1>
<h2 class="sidebar-projectVersion">
v1.1.0
v1.2.0
</h2>
</div>

Expand Down Expand Up @@ -59,7 +59,7 @@ <h2 class="sidebar-projectVersion">


<h1>
<small class="visible-xs">Xlsxir v1.1.0</small>
<small class="visible-xs">Xlsxir v1.2.0</small>
Xlsxir.Timer


Expand Down
6 changes: 3 additions & 3 deletions doc/Xlsxir.Unzip.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="ExDoc v0.11.4">
<title>Xlsxir.Unzip – Xlsxir v1.1.0</title>
<title>Xlsxir.Unzip – Xlsxir v1.2.0</title>
<link rel="stylesheet" href="dist/app-1e374caa3d.css" />
<script src="dist/sidebar_items.js"></script>
</head>
Expand All @@ -27,7 +27,7 @@ <h1 class="sidebar-projectName">
Xlsxir
</h1>
<h2 class="sidebar-projectVersion">
v1.1.0
v1.2.0
</h2>
</div>

Expand Down Expand Up @@ -59,7 +59,7 @@ <h2 class="sidebar-projectVersion">


<h1>
<small class="visible-xs">Xlsxir v1.1.0</small>
<small class="visible-xs">Xlsxir v1.2.0</small>
Xlsxir.Unzip


Expand Down
6 changes: 3 additions & 3 deletions doc/Xlsxir.Worksheet.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="ExDoc v0.11.4">
<title>Xlsxir.Worksheet – Xlsxir v1.1.0</title>
<title>Xlsxir.Worksheet – Xlsxir v1.2.0</title>
<link rel="stylesheet" href="dist/app-1e374caa3d.css" />
<script src="dist/sidebar_items.js"></script>
</head>
Expand All @@ -27,7 +27,7 @@ <h1 class="sidebar-projectName">
Xlsxir
</h1>
<h2 class="sidebar-projectVersion">
v1.1.0
v1.2.0
</h2>
</div>

Expand Down Expand Up @@ -59,7 +59,7 @@ <h2 class="sidebar-projectVersion">


<h1>
<small class="visible-xs">Xlsxir v1.1.0</small>
<small class="visible-xs">Xlsxir v1.2.0</small>
Xlsxir.Worksheet


Expand Down
Loading

0 comments on commit 133331c

Please sign in to comment.