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

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

#include <streaming_workbook_writer.hpp>

Public Member Functions

void close ()
 Finishes writing of the remaining contents of the workbook and closes currently open write stream. This will be called automatically by the destructor if it hasn't already been called manually. More...
 
cell add_cell (const cell_reference &ref)
 Writes a cell to the currently active worksheet at the position given by ref and with the given value. ref should be to the right of or below the previously written cell. More...
 
worksheet add_worksheet (const std::string &title)
 Ends writing of data to the current sheet and begins writing a new sheet with the given title. More...
 
void open (std::vector< std::uint8_t > &data)
 Serializes the workbook into an XLSX file and saves the bytes into byte vector data. More...
 
void open (const std::string &filename)
 Serializes the workbook into an XLSX file and saves the data into a file named filename. More...
 
void open (const xlnt::path &filename)
 Serializes the workbook into an XLSX file and saves the data into a file named filename. More...
 
void open (std::ostream &stream)
 Serializes the workbook into an XLSX file and saves the data into stream. More...
 

Public Attributes

std::unique_ptr< xlnt::detail::xlsx_producer > producer_
 
std::unique_ptr< workbookworkbook_
 
std::unique_ptr< std::ostream > stream_
 
std::unique_ptr< std::streambuf > stream_buffer_
 
std::unique_ptr< std::ostream > part_stream_
 
std::unique_ptr< std::streambuf > part_stream_buffer_
 
std::unique_ptr< xml::serializer > serializer_
 

Detailed Description

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

Member Function Documentation

◆ add_cell()

cell xlnt::streaming_workbook_writer::add_cell ( const cell_reference ref)

Writes a cell to the currently active worksheet at the position given by ref and with the given value. ref should be to the right of or below the previously written cell.

◆ add_worksheet()

worksheet xlnt::streaming_workbook_writer::add_worksheet ( const std::string &  title)

Ends writing of data to the current sheet and begins writing a new sheet with the given title.

◆ close()

void xlnt::streaming_workbook_writer::close ( )

Finishes writing of the remaining contents of the workbook and closes currently open write stream. This will be called automatically by the destructor if it hasn't already been called manually.

◆ open() [1/4]

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

Serializes the workbook into an XLSX file and saves the bytes into byte vector data.

◆ open() [2/4]

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

Serializes the workbook into an XLSX file and saves the data into a file named filename.

◆ open() [3/4]

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

Serializes the workbook into an XLSX file and saves the data into a file named filename.

◆ open() [4/4]

void xlnt::streaming_workbook_writer::open ( std::ostream &  stream)

Serializes the workbook into an XLSX file and saves the data into stream.


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