Module: IronCalc
- Defined in:
- lib/ironcalc/model.rb,
lib/ironcalc/version.rb,
lib/ironcalc/native_methods.rb
Overview
Documentation-only stubs for the methods implemented in the native extension
(ext/ironcalc, via magnus). YARD cannot see Rust source, so the public native
API is described here with @!method directives. This file is NOT required at
runtime — the real methods are defined by the compiled extension. Keep these
stubs in sync with the Rust sources in ext/ironcalc/src (and rake parity).
Coordinate convention everywhere: sheet is a 0-based index; row and
column are 1-based.
Defined Under Namespace
Modules: Batch, DefinedNames Classes: Model, UserModel
Constant Summary collapse
- VERSION =
"0.8.3.0"
Class Method Summary collapse
-
.column_to_number(column) ⇒ Integer
Column identifier to 1-based number:
"AA"becomes 27. -
.create(name, locale, tz, language_id) ⇒ IronCalc::Model
Creates an empty workbook using the raw Model API.
-
.create_user_model(name, locale, tz, language_id) ⇒ IronCalc::UserModel
Creates an empty workbook using the recommended UserModel API.
-
.create_user_model_from_bytes(bytes, language_id) ⇒ IronCalc::UserModel
Loads icalc bytes into the UserModel API.
-
.create_user_model_from_icalc(file_name, language_id) ⇒ IronCalc::UserModel
Loads an icalc file into the UserModel API.
-
.create_user_model_from_xlsx(file_path, locale, tz, language_id) ⇒ IronCalc::UserModel
Loads an xlsx file into the UserModel API.
-
.create_user_model_from_xlsx_bytes(bytes, name, locale, tz, language_id) ⇒ IronCalc::UserModel
Loads the bytes of an xlsx file into the UserModel API.
-
.get_all_timezones ⇒ Array<String>
Timezone names accepted by the constructors.
-
.get_supported_locales ⇒ Array<String>
Locale identifiers accepted by the constructors.
-
.is_valid_a1_identifier(name) ⇒ Boolean
Whether
namecan be a name in an A1-style formula. -
.is_valid_column(column) ⇒ Boolean
Whether
columnis a column identifier within the sheet, e.g. -
.is_valid_column_number(column) ⇒ Boolean
Whether
columnis a 1-based column number within the sheet. -
.is_valid_identifier(name) ⇒ Boolean
Whether
namecan be a defined name. -
.is_valid_row(row) ⇒ Boolean
Whether
rowis a 1-based row number within the sheet. -
.load_from_bytes(bytes, language_id) ⇒ IronCalc::Model
Loads a workbook from icalc bytes (as produced by Model#to_bytes).
-
.load_from_icalc(file_name, language_id) ⇒ IronCalc::Model
Loads a workbook from the internal binary icalc format.
-
.load_from_xlsx(file_path, locale, tz, language_id) ⇒ IronCalc::Model
Loads a workbook from an xlsx file into the raw Model API.
-
.load_from_xlsx_bytes(bytes, name, locale, tz, language_id) ⇒ IronCalc::Model
Loads a workbook from the bytes of an xlsx file into the raw Model API (as produced by Model#to_xlsx_bytes).
-
.number_to_column(column) ⇒ String?
1-based number to column identifier: 27 becomes
"AA". -
.parse_reference_a1(reference) ⇒ Hash?
Parses A1 notation into
{ row:, column:, absolute_row:, absolute_column: }, with 1-based coordinates. -
.parse_reference_r1c1(reference) ⇒ Hash?
As IronCalc.parse_reference_a1, for R1C1 notation such as
"R2C3". -
.quote_name(name) ⇒ String
Quotes a sheet name if a formula reference would need it:
"My Sheet"becomes"'My Sheet'","Sheet1"is returned unchanged.
Class Method Details
.column_to_number(column) ⇒ Integer
Column identifier to 1-based number: "AA" becomes 27.
|
|
# File 'lib/ironcalc/native_methods.rb', line 106
|
.create(name, locale, tz, language_id) ⇒ IronCalc::Model
Creates an empty workbook using the raw Model API.
|
|
# File 'lib/ironcalc/native_methods.rb', line 11
|
.create_user_model(name, locale, tz, language_id) ⇒ IronCalc::UserModel
Creates an empty workbook using the recommended UserModel API.
|
|
# File 'lib/ironcalc/native_methods.rb', line 59
|
.create_user_model_from_bytes(bytes, language_id) ⇒ IronCalc::UserModel
Loads icalc bytes into the UserModel API.
|
|
# File 'lib/ironcalc/native_methods.rb', line 98
|
.create_user_model_from_icalc(file_name, language_id) ⇒ IronCalc::UserModel
Loads an icalc file into the UserModel API.
|
|
# File 'lib/ironcalc/native_methods.rb', line 90
|
.create_user_model_from_xlsx(file_path, locale, tz, language_id) ⇒ IronCalc::UserModel
Loads an xlsx file into the UserModel API.
|
|
# File 'lib/ironcalc/native_methods.rb', line 69
|
.create_user_model_from_xlsx_bytes(bytes, name, locale, tz, language_id) ⇒ IronCalc::UserModel
Loads the bytes of an xlsx file into the UserModel API.
|
|
# File 'lib/ironcalc/native_methods.rb', line 79
|
.get_all_timezones ⇒ Array<String>
Timezone names accepted by the constructors.
|
|
# File 'lib/ironcalc/native_methods.rb', line 188
|
.get_supported_locales ⇒ Array<String>
Locale identifiers accepted by the constructors.
|
|
# File 'lib/ironcalc/native_methods.rb', line 183
|
.is_valid_a1_identifier(name) ⇒ Boolean
|
|
# File 'lib/ironcalc/native_methods.rb', line 151
|
.is_valid_column(column) ⇒ Boolean
Whether column is a column identifier within the sheet, e.g. "AA".
|
|
# File 'lib/ironcalc/native_methods.rb', line 119
|
.is_valid_column_number(column) ⇒ Boolean
Whether column is a 1-based column number within the sheet.
|
|
# File 'lib/ironcalc/native_methods.rb', line 125
|
.is_valid_identifier(name) ⇒ Boolean
Whether name can be a defined name. This is is_valid_a1_identifier
minus the four single letters "R", "r", "C" and "c", which
spreadsheets reserve for R1C1 notation — they stay usable as LAMBDA
parameters and LET variables, so the A1 form accepts them.
IronCalc.is_valid_identifier("total") # => true
IronCalc.is_valid_identifier("R") # => false, the only difference
IronCalc.is_valid_identifier("A1") # => false, a cell reference
|
|
# File 'lib/ironcalc/native_methods.rb', line 137
|
.is_valid_row(row) ⇒ Boolean
Whether row is a 1-based row number within the sheet.
|
|
# File 'lib/ironcalc/native_methods.rb', line 131
|
.load_from_bytes(bytes, language_id) ⇒ IronCalc::Model
Loads a workbook from icalc bytes (as produced by IronCalc::Model#to_bytes).
|
|
# File 'lib/ironcalc/native_methods.rb', line 51
|
.load_from_icalc(file_name, language_id) ⇒ IronCalc::Model
Loads a workbook from the internal binary icalc format.
|
|
# File 'lib/ironcalc/native_methods.rb', line 43
|
.load_from_xlsx(file_path, locale, tz, language_id) ⇒ IronCalc::Model
Loads a workbook from an xlsx file into the raw Model API.
|
|
# File 'lib/ironcalc/native_methods.rb', line 21
|
.load_from_xlsx_bytes(bytes, name, locale, tz, language_id) ⇒ IronCalc::Model
Loads a workbook from the bytes of an xlsx file into the raw Model API (as produced by IronCalc::Model#to_xlsx_bytes).
|
|
# File 'lib/ironcalc/native_methods.rb', line 31
|
.number_to_column(column) ⇒ String?
1-based number to column identifier: 27 becomes "AA".
|
|
# File 'lib/ironcalc/native_methods.rb', line 113
|
.parse_reference_a1(reference) ⇒ Hash?
Parses A1 notation into { row:, column:, absolute_row:, absolute_column: },
with 1-based coordinates. "$B$2" reports both absolute flags.
|
|
# File 'lib/ironcalc/native_methods.rb', line 170
|
.parse_reference_r1c1(reference) ⇒ Hash?
As parse_reference_a1, for R1C1 notation such as "R2C3".
|
|
# File 'lib/ironcalc/native_methods.rb', line 177
|
.quote_name(name) ⇒ String
Quotes a sheet name if a formula reference would need it:
"My Sheet" becomes "'My Sheet'", "Sheet1" is returned unchanged.
|
|
# File 'lib/ironcalc/native_methods.rb', line 163
|