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

Classes: Model, UserModel

Constant Summary collapse

VERSION =
"0.7.1.5"

Class Method Summary collapse

Class Method Details

.create(name, locale, tz, language_id) ⇒ IronCalc::Model

Creates an empty workbook using the raw Model API.

Parameters:

  • name (String)

    workbook name

  • locale (String)

    e.g. "en"

  • tz (String)

    IANA timezone, e.g. "UTC"

  • language_id (String)

    e.g. "en"

Returns:

Raises:

  • (IronCalc::Error)


# 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.

Parameters:

  • name (String)
  • locale (String)
  • tz (String)
  • language_id (String)

Returns:

Raises:

  • (IronCalc::Error)


# 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.

Parameters:

  • bytes (String)

    binary icalc bytes

  • language_id (String)

Returns:

Raises:

  • (IronCalc::Error)


# 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.

Parameters:

  • file_name (String)
  • language_id (String)

Returns:

Raises:

  • (IronCalc::Error)


# 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.

Parameters:

  • file_path (String)
  • locale (String)
  • tz (String)
  • language_id (String)

Returns:

Raises:

  • (IronCalc::Error)


# 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 IronCalc::Model#to_bytes).

Parameters:

  • bytes (String)

    binary icalc bytes

  • language_id (String)

Returns:

Raises:

  • (IronCalc::Error)


# 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.

Parameters:

  • file_name (String)
  • language_id (String)

Returns:

Raises:

  • (IronCalc::Error)


# 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.

Parameters:

  • file_path (String)
  • locale (String)
  • tz (String)
  • language_id (String)

Returns:

Raises:

  • (IronCalc::Error)


# File 'lib/ironcalc/native_methods.rb', line 21