NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
|
#include <BasicExcel.hpp>
Public Member Functions | |
BasicExcelWorksheet (BasicExcel *excel, size_t sheetIndex) | |
char * | GetAnsiSheetName () |
Get the current worksheet name. Returns 0 if name is in Unicode format. More... | |
wchar_t * | GetUnicodeSheetName () |
Get the current worksheet name. Returns 0 if name is in Ansi format. More... | |
bool | GetSheetName (char *name) |
Get the current worksheet name. Returns false if name is in Unicode format. More... | |
bool | GetSheetName (wchar_t *name) |
Get the current worksheet name. Returns false if name is in Ansi format. More... | |
bool | Rename (const char *to) |
Rename current Excel worksheet to another ANSI name. Returns true if successful, false if otherwise. More... | |
bool | Rename (const wchar_t *to) |
Rename current Excel worksheet to another Unicode name. Returns true if successful, false if otherwise. More... | |
void | Print (std::ostream &os, char delimiter=',', char textQualifier='\0') |
Print entire worksheet to an output stream, separating each column with the defined delimiter and enclosing text using the defined textQualifier. Leave out the textQualifier argument if do not wish to have any text qualifiers. More... | |
size_t | GetTotalRows () |
Total number of rows in current Excel worksheet. More... | |
size_t | GetTotalCols () |
Total number of columns in current Excel worksheet. More... | |
BasicExcelCell * | Cell (size_t row, size_t col) |
Return a pointer to an Excel cell. row and col starts from 0. Returns 0 if row exceeds 65535 or col exceeds 255. More... | |
bool | EraseCell (size_t row, size_t col) |
Erase content of a cell. row and col starts from 0. Returns true if successful, false if row or col exceeds range. More... | |
Private Member Functions | |
void | UpdateCells () |
Update cells using information from BasicExcel.worksheets_. More... | |
Private Attributes | |
BasicExcel * | excel_ |
Pointer to instance of BasicExcel. More... | |
size_t | sheetIndex_ |
Index of worksheet in workbook. More... | |
size_t | maxRows_ |
Total number of rows in worksheet. More... | |
size_t | maxCols_ |
Total number of columns in worksheet. More... | |
std::vector< std::vector< BasicExcelCell > > | cells_ |
Cells matrix. More... | |
Friends | |
class | BasicExcel |
Definition at line 1172 of file BasicExcel.hpp.
YExcel::BasicExcelWorksheet::BasicExcelWorksheet | ( | BasicExcel * | excel, |
size_t | sheetIndex | ||
) |
Definition at line 5385 of file BasicExcel.cpp.
References UpdateCells().
BasicExcelCell * YExcel::BasicExcelWorksheet::Cell | ( | size_t | row, |
size_t | col | ||
) |
Return a pointer to an Excel cell. row and col starts from 0. Returns 0 if row exceeds 65535 or col exceeds 255.
Definition at line 5541 of file BasicExcel.cpp.
References cells_, maxCols_, and maxRows_.
Referenced by Print(), NumeRe::XLSSpreadSheet::readFile(), and NumeRe::XLSSpreadSheet::writeFile().
bool YExcel::BasicExcelWorksheet::EraseCell | ( | size_t | row, |
size_t | col | ||
) |
Erase content of a cell. row and col starts from 0. Returns true if successful, false if row or col exceeds range.
Definition at line 5565 of file BasicExcel.cpp.
char * YExcel::BasicExcelWorksheet::GetAnsiSheetName | ( | ) |
Get the current worksheet name. Returns 0 if name is in Unicode format.
Definition at line 5393 of file BasicExcel.cpp.
References YExcel::Workbook::boundSheets_, excel_, sheetIndex_, and YExcel::BasicExcel::workbook_.
bool YExcel::BasicExcelWorksheet::GetSheetName | ( | char * | name | ) |
Get the current worksheet name. Returns false if name is in Unicode format.
Definition at line 5415 of file BasicExcel.cpp.
References YExcel::Workbook::boundSheets_, excel_, name, sheetIndex_, and YExcel::BasicExcel::workbook_.
bool YExcel::BasicExcelWorksheet::GetSheetName | ( | wchar_t * | name | ) |
Get the current worksheet name. Returns false if name is in Ansi format.
Definition at line 5427 of file BasicExcel.cpp.
References YExcel::Workbook::boundSheets_, excel_, name, sheetIndex_, and YExcel::BasicExcel::workbook_.
size_t YExcel::BasicExcelWorksheet::GetTotalCols | ( | ) |
Total number of columns in current Excel worksheet.
Definition at line 5533 of file BasicExcel.cpp.
References maxCols_.
Referenced by NumeRe::XLSSpreadSheet::readFile().
size_t YExcel::BasicExcelWorksheet::GetTotalRows | ( | ) |
Total number of rows in current Excel worksheet.
Definition at line 5527 of file BasicExcel.cpp.
References maxRows_.
Referenced by NumeRe::XLSSpreadSheet::readFile().
wchar_t * YExcel::BasicExcelWorksheet::GetUnicodeSheetName | ( | ) |
Get the current worksheet name. Returns 0 if name is in Ansi format.
Definition at line 5404 of file BasicExcel.cpp.
References YExcel::Workbook::boundSheets_, excel_, sheetIndex_, and YExcel::BasicExcel::workbook_.
void YExcel::BasicExcelWorksheet::Print | ( | std::ostream & | os, |
char | delimiter = ',' , |
||
char | textQualifier = '\0' |
||
) |
Print entire worksheet to an output stream, separating each column with the defined delimiter and enclosing text using the defined textQualifier. Leave out the textQualifier argument if do not wish to have any text qualifiers.
Definition at line 5469 of file BasicExcel.cpp.
References Cell(), YExcel::BasicExcelCell::DOUBLE, YExcel::BasicExcelCell::Get(), YExcel::BasicExcelCell::GetDouble(), YExcel::BasicExcelCell::GetInteger(), YExcel::BasicExcelCell::GetString(), YExcel::BasicExcelCell::GetStringLength(), YExcel::BasicExcelCell::INT, maxCols_, maxRows_, YExcel::BasicExcelCell::STRING, YExcel::BasicExcelCell::Type(), YExcel::BasicExcelCell::UNDEFINED, and YExcel::BasicExcelCell::WSTRING.
bool YExcel::BasicExcelWorksheet::Rename | ( | const char * | to | ) |
Rename current Excel worksheet to another ANSI name. Returns true if successful, false if otherwise.
Definition at line 5439 of file BasicExcel.cpp.
References YExcel::Workbook::boundSheets_, excel_, sheetIndex_, and YExcel::BasicExcel::workbook_.
bool YExcel::BasicExcelWorksheet::Rename | ( | const wchar_t * | to | ) |
Rename current Excel worksheet to another Unicode name. Returns true if successful, false if otherwise.
Print entire worksheet to an output stream, separating each column with the defined delimiter and enclosing text using the defined textQualifier. Leave out the textQualifier argument if do not wish to have any text qualifiers.
Definition at line 5454 of file BasicExcel.cpp.
References YExcel::Workbook::boundSheets_, excel_, sheetIndex_, and YExcel::BasicExcel::workbook_.
|
private |
Update cells using information from BasicExcel.worksheets_.
Definition at line 5576 of file BasicExcel.cpp.
References YExcel::CODE::BLANK, YExcel::CODE::BOOLERR, cells_, excel_, YExcel::CODE::FORMULA, YExcel::GetDoubleFromRKValue(), YExcel::GetIntegerFromRKValue(), YExcel::IsRKValueAnInteger(), YExcel::CODE::LABELSST, YExcel::Worksheet::Dimensions::lastUsedColIndexPlusOne_, YExcel::Worksheet::Dimensions::lastUsedRowIndexPlusOne_, maxCols_, maxRows_, YExcel::CODE::MULBLANK, YExcel::CODE::MULRK, YExcel::CODE::NUMBER, YExcel::CODE::RK, sheetIndex_, YExcel::Workbook::sst_, YExcel::Workbook::SharedStringTable::strings_, YExcel::BasicExcel::workbook_, and YExcel::BasicExcel::worksheets_.
Referenced by BasicExcelWorksheet().
|
friend |
Definition at line 1174 of file BasicExcel.hpp.
|
private |
Cells matrix.
Definition at line 1203 of file BasicExcel.hpp.
Referenced by Cell(), EraseCell(), and UpdateCells().
|
private |
Pointer to instance of BasicExcel.
Definition at line 1199 of file BasicExcel.hpp.
Referenced by GetAnsiSheetName(), GetSheetName(), GetUnicodeSheetName(), Rename(), and UpdateCells().
|
private |
Total number of columns in worksheet.
Definition at line 1202 of file BasicExcel.hpp.
Referenced by Cell(), EraseCell(), GetTotalCols(), Print(), and UpdateCells().
|
private |
Total number of rows in worksheet.
Definition at line 1201 of file BasicExcel.hpp.
Referenced by Cell(), EraseCell(), GetTotalRows(), Print(), and UpdateCells().
|
private |
Index of worksheet in workbook.
Definition at line 1200 of file BasicExcel.hpp.
Referenced by YExcel::BasicExcel::AddWorksheet(), GetAnsiSheetName(), GetSheetName(), GetUnicodeSheetName(), Rename(), and UpdateCells().