Crexcel::Worksheet
TODO Write doc for Worksheet class
Constants
SUPPORTED_TYPES = {"string" => "s", "int" => "n"}
Instance methods
Fetch the data at the given x, y postition
first_worksheet = workbook.add_worksheet
first_worksheet.write(0, 0, "hello") # Will write "hello" in A1 cell
first_worksheet.get(0, 0) # => {pos: "A1", value: "hello", type: ""}
Fetch the data at the given string postition
first_worksheet = workbook.add_worksheet
first_worksheet.write(0, 0, "hello") # Will write "hello" in A1 cell
first_worksheet.get("A1") # => {pos: "A1", value: "hello", type: ""}
Write data in the specified worksheet at specific location You can precise the type you want
first_worksheet = workbook.add_worksheet
first_worksheet.write("A1", "1337", "int") # Will write 1337 as a number
Available types are for now : string, int
write(pos_x : Int32 | Int64, pos_y : Int32 | Int64, str : Int32 | Int64 | Float64 | String, type_req = "")
Same as other write methods, but location is precised differently
first_worksheet = workbook.add_worksheet
first_worksheet.write(0, 0, "hello") # Will write "hello" in A1 cell
Write data in the specified worksheet at specific location
first_worksheet = workbook.add_worksheet
first_worksheet.write("A1", "Hello world!")
first_worksheet.write("A2", "1337") # Will write 1337 as a string
first_worksheet.write("B1", 1337) # Will write 1337 as a number
Will write a row with the provided array of data
first_worksheet = workbook.add_worksheet
first_worksheet.write_row(0, ["hello", "world"]) # Will write "hello" in A1 cell and "world" in A2