Workbook

Workbook.

Members

Functions

bySheet
auto bySheet()
sheetNameIds
SheetNameId[] sheetNameIds()
Undocumented in source. Be warned that the author may not have intended to support it.
sheets
auto sheets()

Static functions

fromBytes
typeof(this) fromBytes(void[] buffer)
Undocumented in source. Be warned that the author may not have intended to support it.
fromFile
typeof(this) fromFile(string filename)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

filename
string filename;
Undocumented in source.

Examples

benchmark reading of "50xP_sheet1.xlsx"

const path = "test/data/50xP_sheet1.xlsx";
import std.meta : AliasSeq;
void use_sheetNamesAndreadSheet() @trusted {
    foreach (const _, const ref s; Workbook.fromFile(path).sheets) {
    }
}

size_t use_bySheet() @trusted {
    auto file = Workbook.fromFile(path);
    typeof(return) i = 0;
    foreach (ref sheet; file.bySheet) {
        i++;
    }

    return i;
}

alias funs = AliasSeq!(/* use_sheetNamesAndreadSheet, */
    use_bySheet);
auto results = benchmarkSum!(funs)(runCount);
foreach (const i, fun; funs) {
    writeln(fun.stringof[0 .. $ - 2], "(\"", path, "\") took ",
            results[i] / runCount);
}

Meta