NAME
Spreadsheet::ExcelTableReader::Field - Field description for Spreadsheet::ExcelTableReader
VERSION
version 0.000001_001
DESCRIPTION
This class describes aspects of one of the fields you want to find in your spreadsheet.
ATTRIBUTES
name
Required. Used for the hashref key if you pull records as hashes, and used in diagnostic messages.
header
A string or regex describing the column header you want to find in the spreadsheet. Defaults to a case-insensitive match of name
with allowed prefix/suffix of non-word (\W
) garbage. If you specify a regex, it is used directly. If you specify a string, the regex will match exactly that string (case-sensitive) but also trim
depending on that attribute.
required
Whether or not this field must be found in order to read a table. Defaults to true.
trim
Whether or not to remove prefix/suffix whitespace from each value of the field. defaults to true.
blank
The value to extract when the spreadsheet cell is empty. (where "empty" depends on the value of trim
). Default is undef. Other common value would be ""
.
type
A Type::Tiny type (or any object or class with a check
method) which will validate each value pulled from a cell for this field. Optional. No default.
header_regex
header
, coerced to a regex according to the description in "header"
AUTHOR
Michael Conrad <mike@nrdvana.net>
COPYRIGHT AND LICENSE
This software is copyright (c) 2016 by Michael Conrad.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.