-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWorkbookStream.h
65 lines (53 loc) · 1.81 KB
/
WorkbookStream.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#ifndef BIFF8RC_H
#define BIFF8RC_H
/*////////////////////////////////////////////////////////////////////////////////////////////////
The Workbook Stream specifies global properties and data for a workbook, as well as the sheets (1) that constitute a workbook.
The name of this stream (1) MUST be "Workbook". A file MUST contain exactly one Workbook Stream, which consists of several
substreams. There MUST be exactly one substream (Globals Substream), and the substream MUST be the first substream
to appear in the Workbook Stream, which MUST be followed by one or more of the following substreams:
Chart Sheet Substream
Dialog Sheet Substream
Macro Sheet Substream
Worksheet Substream
//////////////////////////////////////////////////////////////////////////////////////////////// */
#include "RecordReader.h"
#include "GlobalsSubstream.h"
#include "WorksheetSubstream.h"
namespace ExceLite
{
class worksheet
{
friend class BIFF8Reader;
public:
size_t getTotalRows();
size_t getTotalCols();
private:
bool set(QWorksheetSubstream* psheet);
QWorksheetSubstream* _psheet;
//BasicExcelCell* Cell(size_t row, size_t col);
};
class cell
{
//int Type() const;
//int GetInteger() const;
//double GetDouble() const;
//const char* GetString() const;
};
class BIFF8Reader
{
public:
BIFF8Reader();
BIFF8Reader(const char* filename);
~BIFF8Reader();
bool Load(const char* filename);
public:
size_t GetTotalSheets();
bool GetWorksheet(size_t sheetIndex,worksheet & sheet);
// BasicExcelWorksheet* GetWorksheet(const char* name);
private:
RecordIO _recIO;
QGlobalsSubstream _global;
QVector<QWorksheetSubstream*> _sheets;
};
}
#endif // BIFF8RC_H