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
Constant Summary collapse
- VERSION =
"0.7.1.1"
Class Method Summary collapse
-
.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.
-
.load_from_bytes(bytes, language_id) ⇒ IronCalc::Model
Loads a workbook from icalc bytes (as produced by #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.
Instance Method Summary collapse
-
#add_sheet(name) ⇒ void
Adds a new sheet with the given name.
-
#clear_cell_contents(sheet, row, column) ⇒ void
Clears a cell’s contents (not its style).
-
#delete_columns(sheet, column, column_count) ⇒ void
Deletes
column_countcolumns starting atcolumn. -
#delete_rows(sheet, row, row_count) ⇒ void
Deletes
row_countrows starting atrow. - #delete_sheet(sheet) ⇒ void
-
#evaluate ⇒ void
Recalculates the whole workbook.
-
#get_cell_content(sheet, row, column) ⇒ String
Returns the cell’s content: the formula (e.g. “=A1+1”) or literal text.
-
#get_cell_style_json(sheet, row, column) ⇒ String
private
JSON backing for ‘get_cell_style`.
-
#get_cell_type(sheet, row, column) ⇒ Symbol
Returns the cell type as a Symbol:
:number,:text,:logical_value,:error_value,:arrayor:compound_data. -
#get_column_width(sheet, column) ⇒ Float
Width in pixels.
-
#get_formatted_cell_value(sheet, row, column) ⇒ String
Returns the cell’s value formatted as displayed (number format applied).
- #get_frozen_columns_count(sheet) ⇒ Integer
- #get_frozen_rows_count(sheet) ⇒ Integer
-
#get_row_height(sheet, row) ⇒ Float
Height in pixels.
-
#get_sheet_dimensions(sheet) ⇒ Array(Integer, Integer, Integer, Integer)
Returns [min_row, max_row, min_column, max_column] over non-empty cells (an empty sheet returns [1, 1, 1, 1]).
-
#get_worksheets_properties ⇒ Array<Hash>
Returns one Hash per sheet with symbol keys
:name,:state,:sheet_idand:color. -
#insert_columns(sheet, column, column_count) ⇒ void
Inserts
column_countcolumns beforecolumn. -
#insert_rows(sheet, row, row_count) ⇒ void
Inserts
row_countrows beforerow. -
#new_sheet ⇒ void
Adds a new sheet with an auto-generated name.
- #rename_sheet(sheet, new_name) ⇒ void
-
#save_to_icalc(file) ⇒ void
Saves the workbook to the internal binary icalc format.
-
#save_to_xlsx(file) ⇒ void
Saves the workbook to an xlsx file.
-
#set_cell_style_json(sheet, row, column, style_json) ⇒ void
private
JSON backing for ‘set_cell_style`.
- #set_column_width(sheet, column, width) ⇒ void
- #set_frozen_columns_count(sheet, count) ⇒ void
- #set_frozen_rows_count(sheet, count) ⇒ void
- #set_row_height(sheet, row, height) ⇒ void
- #set_sheet_color(sheet, color) ⇒ void
-
#set_user_input(sheet, row, column, value) ⇒ void
Sets a cell’s raw input (a literal or a formula like “=A1+1”).
-
#to_bytes ⇒ String
Serializes the workbook to icalc bytes (load with IronCalc.load_from_bytes).
Class Method Details
.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 47
|
.create_user_model_from_bytes(bytes, language_id) ⇒ IronCalc::UserModel
Loads icalc bytes into the UserModel API.
|
|
# File 'lib/ironcalc/native_methods.rb', line 75
|
.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 67
|
.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 57
|
.load_from_bytes(bytes, language_id) ⇒ IronCalc::Model
Loads a workbook from icalc bytes (as produced by #to_bytes).
|
|
# File 'lib/ironcalc/native_methods.rb', line 39
|
.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 31
|
.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
|
Instance Method Details
#add_sheet(name) ⇒ void
This method returns an undefined value.
Adds a new sheet with the given name.
|
|
# File 'lib/ironcalc/native_methods.rb', line 251
|
#clear_cell_contents(sheet, row, column) ⇒ void
This method returns an undefined value.
Clears a cell’s contents (not its style).
|
|
# File 'lib/ironcalc/native_methods.rb', line 117
|
#delete_columns(sheet, column, column_count) ⇒ void
This method returns an undefined value.
Deletes column_count columns starting at column.
|
|
# File 'lib/ironcalc/native_methods.rb', line 184
|
#delete_rows(sheet, row, row_count) ⇒ void
This method returns an undefined value.
Deletes row_count rows starting at row.
|
|
# File 'lib/ironcalc/native_methods.rb', line 176
|
#delete_sheet(sheet) ⇒ void
This method returns an undefined value.
|
|
# File 'lib/ironcalc/native_methods.rb', line 261
|
#evaluate ⇒ void
This method returns an undefined value.
Recalculates the whole workbook. Call after #set_user_input.
|
|
# File 'lib/ironcalc/native_methods.rb', line 104
|
#get_cell_content(sheet, row, column) ⇒ String
Returns the cell’s content: the formula (e.g. “=A1+1”) or literal text.
|
|
# File 'lib/ironcalc/native_methods.rb', line 125
|
#get_cell_style_json(sheet, row, column) ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
JSON backing for ‘get_cell_style`. Prefer the Hash-returning wrapper.
|
|
# File 'lib/ironcalc/native_methods.rb', line 150
|
#get_cell_type(sheet, row, column) ⇒ Symbol
Returns the cell type as a Symbol: :number, :text, :logical_value, :error_value, :array or :compound_data.
|
|
# File 'lib/ironcalc/native_methods.rb', line 133
|
#get_column_width(sheet, column) ⇒ Float
Returns width in pixels.
|
|
# File 'lib/ironcalc/native_methods.rb', line 192
|
#get_formatted_cell_value(sheet, row, column) ⇒ String
Returns the cell’s value formatted as displayed (number format applied).
|
|
# File 'lib/ironcalc/native_methods.rb', line 142
|
#get_frozen_columns_count(sheet) ⇒ Integer
|
|
# File 'lib/ironcalc/native_methods.rb', line 218
|
#get_frozen_rows_count(sheet) ⇒ Integer
|
|
# File 'lib/ironcalc/native_methods.rb', line 223
|
#get_row_height(sheet, row) ⇒ Float
Returns height in pixels.
|
|
# File 'lib/ironcalc/native_methods.rb', line 198
|
#get_sheet_dimensions(sheet) ⇒ Array(Integer, Integer, Integer, Integer)
Returns [min_row, max_row, min_column, max_column] over non-empty cells (an empty sheet returns [1, 1, 1, 1]).
|
|
# File 'lib/ironcalc/native_methods.rb', line 272
|
#get_worksheets_properties ⇒ Array<Hash>
Returns one Hash per sheet with symbol keys :name, :state, :sheet_id and :color.
|
|
# File 'lib/ironcalc/native_methods.rb', line 240
|
#insert_columns(sheet, column, column_count) ⇒ void
This method returns an undefined value.
Inserts column_count columns before column.
|
|
# File 'lib/ironcalc/native_methods.rb', line 168
|
#insert_rows(sheet, row, row_count) ⇒ void
This method returns an undefined value.
Inserts row_count rows before row.
|
|
# File 'lib/ironcalc/native_methods.rb', line 160
|
#new_sheet ⇒ void
This method returns an undefined value.
Adds a new sheet with an auto-generated name.
|
|
# File 'lib/ironcalc/native_methods.rb', line 257
|
#rename_sheet(sheet, new_name) ⇒ void
This method returns an undefined value.
|
|
# File 'lib/ironcalc/native_methods.rb', line 266
|
#save_to_icalc(file) ⇒ void
This method returns an undefined value.
Saves the workbook to the internal binary icalc format.
|
|
# File 'lib/ironcalc/native_methods.rb', line 94
|
#save_to_xlsx(file) ⇒ void
This method returns an undefined value.
Saves the workbook to an xlsx file. Fails if the file already exists.
|
|
# File 'lib/ironcalc/native_methods.rb', line 88
|
#set_cell_style_json(sheet, row, column, style_json) ⇒ void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
This method returns an undefined value.
JSON backing for ‘set_cell_style`. Prefer the Hash-accepting wrapper.
|
|
# File 'lib/ironcalc/native_methods.rb', line 155
|
#set_column_width(sheet, column, width) ⇒ void
This method returns an undefined value.
|
|
# File 'lib/ironcalc/native_methods.rb', line 204
|
#set_frozen_columns_count(sheet, count) ⇒ void
This method returns an undefined value.
|
|
# File 'lib/ironcalc/native_methods.rb', line 228
|
#set_frozen_rows_count(sheet, count) ⇒ void
This method returns an undefined value.
|
|
# File 'lib/ironcalc/native_methods.rb', line 234
|
#set_row_height(sheet, row, height) ⇒ void
This method returns an undefined value.
|
|
# File 'lib/ironcalc/native_methods.rb', line 211
|
#set_sheet_color(sheet, color) ⇒ void
This method returns an undefined value.
|
|
# File 'lib/ironcalc/native_methods.rb', line 245
|
#set_user_input(sheet, row, column, value) ⇒ void
This method returns an undefined value.
Sets a cell’s raw input (a literal or a formula like “=A1+1”).
|
|
# File 'lib/ironcalc/native_methods.rb', line 108
|
#to_bytes ⇒ String
Serializes the workbook to icalc bytes (load with load_from_bytes).
|
|
# File 'lib/ironcalc/native_methods.rb', line 100
|