xlnt
Public Member Functions | List of all members
xlnt::streaming_workbook_reader Class Reference

workbook is the container for all other parts of the document. More...

#include <streaming_workbook_reader.hpp>

Public Member Functions

void close ()
 Closes currently open read stream. This will be called automatically by the destructor if it hasn't already been called manually. More...
 
bool has_cell ()
 
cell read_cell ()
 Reads the next cell in the current worksheet and optionally returns it if the last cell in the sheet has not yet been read. More...
 
bool has_worksheet (const std::string &name)
 
void begin_worksheet (const std::string &name)
 Beings reading of the next worksheet in the workbook and optionally returns its title if the last worksheet has not yet been read. More...
 
worksheet end_worksheet ()
 Ends reading of the current worksheet in the workbook and optionally returns a worksheet object corresponding to the worksheet with the title returned by begin_worksheet(). More...
 
void open (const std::vector< std::uint8_t > &data)
 Interprets byte vector data as an XLSX file and sets the content of this workbook to match that file. More...
 
void open (const std::string &filename)
 Interprets file with the given filename as an XLSX file and sets the content of this workbook to match that file. More...
 
void open (const path &filename)
 Interprets file with the given filename as an XLSX file and sets the content of this workbook to match that file. More...
 
void open (std::istream &stream)
 Interprets data in stream as an XLSX file and sets the content of this workbook to match that file. More...
 
void open (std::unique_ptr< std::streambuf > &&buffer)
 Holds the given streambuf internally, creates a std::istream backed by the given buffer, and calls open(std::istream &) with that stream. More...
 
std::vector< std::string > sheet_titles ()
 Returns a vector of the titles of sheets in the workbook in order. More...
 

Detailed Description

workbook is the container for all other parts of the document.

Member Function Documentation

◆ begin_worksheet()

void xlnt::streaming_workbook_reader::begin_worksheet ( const std::string &  name)

Beings reading of the next worksheet in the workbook and optionally returns its title if the last worksheet has not yet been read.

◆ close()

void xlnt::streaming_workbook_reader::close ( )

Closes currently open read stream. This will be called automatically by the destructor if it hasn't already been called manually.

◆ end_worksheet()

worksheet xlnt::streaming_workbook_reader::end_worksheet ( )

Ends reading of the current worksheet in the workbook and optionally returns a worksheet object corresponding to the worksheet with the title returned by begin_worksheet().

◆ open() [1/5]

void xlnt::streaming_workbook_reader::open ( const std::vector< std::uint8_t > &  data)

Interprets byte vector data as an XLSX file and sets the content of this workbook to match that file.

◆ open() [2/5]

void xlnt::streaming_workbook_reader::open ( const std::string &  filename)

Interprets file with the given filename as an XLSX file and sets the content of this workbook to match that file.

◆ open() [3/5]

void xlnt::streaming_workbook_reader::open ( const path filename)

Interprets file with the given filename as an XLSX file and sets the content of this workbook to match that file.

◆ open() [4/5]

void xlnt::streaming_workbook_reader::open ( std::istream &  stream)

Interprets data in stream as an XLSX file and sets the content of this workbook to match that file.

◆ open() [5/5]

void xlnt::streaming_workbook_reader::open ( std::unique_ptr< std::streambuf > &&  buffer)

Holds the given streambuf internally, creates a std::istream backed by the given buffer, and calls open(std::istream &) with that stream.

◆ read_cell()

cell xlnt::streaming_workbook_reader::read_cell ( )

Reads the next cell in the current worksheet and optionally returns it if the last cell in the sheet has not yet been read.

◆ sheet_titles()

std::vector<std::string> xlnt::streaming_workbook_reader::sheet_titles ( )

Returns a vector of the titles of sheets in the workbook in order.


The documentation for this class was generated from the following file: