API Reference

XLSXasJSON.JSONWorkbookType
JSONWorkbook(file::AbstractString; start_line = 1)

start_line of each sheets are considered as JSONPointer for data structure. And each sheets are pared to Array{PointerDict, 1}

Constructors

JSONWorkbook("Example.xlsx")

Arguments

arguments are applied to all Worksheets within Workbook.

  • row_oriented : if 'true'(the default) it will look for colum names in '1:1', if false it will look for colum names in 'A:A'
  • start_line : starting index of position of columnname.
  • squeeze : squeezes all rows of Worksheet to a singe row.
  • delim : a String or Regrex that of deliminator for converting single cell to array.
source
XLSXasJSON.JSONWorksheetType
JSONWorksheet

construct 'Array{OrderedDict, 1}' for each row from Worksheet

Constructors

JSONWorksheet("Example.xlsx", "Sheet1")
JSONWorksheet("Example.xlsx", 1)

Arguments

  • row_oriented : if 'true'(the default) it will look for colum names in '1:1', if false it will look for colum names in 'A:A'
  • start_line : starting index of position of columnname.
  • squeeze : squeezes all rows of Worksheet to a singe row.
  • delim : a String or Regrex that of deliminator for converting single cell to array.
source
Base.mergeFunction
merge(a::JSONWorksheet, b::JSONWorksheet, bykey::AbstractString)

Construct a merged JSONWorksheet from the given JSONWorksheets. If the same Pointer is present in another collection, the value for that key will be the value it has in the last collection listed.

source
XLSXasJSON.fuzzymatchFunction
fuzzymatch(l::Dict, idx::AbstractString)

Fuzzy matching rules:

1. ignore case

2. maximum Levenshtein distance is 2

3. always show matches with 0 difference (wrong case)

4. on top of 3. do not show more than 8 matches in total

Returns candidates ordered by (distance, name) pair

source
XLSXasJSON.parse_column_headerFunction
parse_column_header(token_string)::Pointer

Parse an Excel column header into a JSONPointer.Pointer.

A leading / is added if missing, so both "a/b" and "/a/b" are accepted. A trailing {jsontype} suffix declares an array element type and produces a Pointer{Array{T, 1}}, where T is resolved by jsontype_to_juliatype. Without the suffix, a plain (JSON)Pointer is returned.

Examples

parse_column_header("a/b")           # Pointer
parse_column_header("/a/b")          # Pointer
parse_column_header("a/b{integer}")  # Pointer{Array{Int, 1}}
source