mirror of
https://github.com/tfussell/xlnt.git
synced 2024-03-22 13:11:17 +08:00
update docs
This commit is contained in:
parent
872d6ae16d
commit
5e54200b4c
183
docs/api/xlnt.rst
Normal file
183
docs/api/xlnt.rst
Normal file
|
@ -0,0 +1,183 @@
|
||||||
|
xlnt library
|
||||||
|
============
|
||||||
|
|
||||||
|
.. doxygenstruct:: xlnt::cell_reference_hash
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::cell_reference
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::cell
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::comment
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenstruct:: xlnt::date
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenstruct:: xlnt::time
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenstruct:: xlnt::datetime
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenstruct:: xlnt::timedelta
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::relationship
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenstruct:: xlnt::zip_info
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::zip_file
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::drawing
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::tokenizer
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::translator
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::alignment
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::border
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::color
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::fill
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::font
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::named_style
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::number_format
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::protection
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::side
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::style
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::document_properties
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::document_security
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::manifest
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::named_range
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::theme
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::workbook
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::cell_vector
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::column_properties
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenstruct:: xlnt::major_order
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::page_margins
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenstruct:: xlnt::page_setup
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::pane
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::range_reference
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::range
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::row_properties
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::sheet_protection
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::sheet_view
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::header
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::footer
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::header_footer
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenstruct:: xlnt::margins
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::worksheet
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::comment_serializer
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::excel_serializer
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::manifest_serializer
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::relationship_serializer
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::shared_strings_serializer
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::style_serializer
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::theme_serializer
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::workbook_serializer
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::worksheet_serializer
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::xml_document
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::xml_node
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::xml_serializer
|
||||||
|
:members:
|
||||||
|
|
||||||
|
library modules
|
||||||
|
===============
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
|
||||||
|
xlnt.s11n
|
38
docs/api/xlnt.s11n.rst
Normal file
38
docs/api/xlnt.s11n.rst
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
serialization module
|
||||||
|
====================
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::comment_serializer
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::excel_serializer
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::manifest_serializer
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::relationship_serializer
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::shared_strings_serializer
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::style_serializer
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::theme_serializer
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::workbook_serializer
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::worksheet_serializer
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::xml_document
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::xml_node
|
||||||
|
:members:
|
||||||
|
|
||||||
|
.. doxygenclass:: xlnt::xml_serializer
|
||||||
|
:members:
|
254
docs/index.rst
254
docs/index.rst
|
@ -1,189 +1,131 @@
|
||||||
.. xlnt documentation master file, created by
|
:mod:`xlnt` - user-friendly xlsx library for C++14
|
||||||
sphinx-quickstart on Mon Oct 26 10:31:07 2015.
|
===========================================================================
|
||||||
You can adapt this file completely to your liking, but it should at least
|
|
||||||
contain the root `toctree` directive.
|
|
||||||
|
|
||||||
Welcome to xlnt's documentation!
|
.. module:: xlnt
|
||||||
================================
|
.. moduleauthor:: Thomas Fussell
|
||||||
|
|
||||||
Contents:
|
:Author: Thomas Fussell
|
||||||
|
:Source code: https://github.com/tfussell/xlnt
|
||||||
|
:Issues: https://github.com/tfussell/xlnt/issues
|
||||||
|
:Generated: |today|
|
||||||
|
:License: MIT
|
||||||
|
:Version: |release|
|
||||||
|
|
||||||
|
Introduction
|
||||||
|
------------
|
||||||
|
|
||||||
|
xlnt is a C++14 library for reading, writing, and modifying xlsx files as described in ECMA 376.
|
||||||
|
|
||||||
|
The API is generally based on openpyxl, a python library for reading and writing xlsx/xlsm files.
|
||||||
|
|
||||||
|
This is still very much a work in progress, but the core development work is complete.
|
||||||
|
|
||||||
|
Support
|
||||||
|
+++++++
|
||||||
|
|
||||||
|
Sample code:
|
||||||
|
++++++++++++
|
||||||
|
|
||||||
|
.. literalinclude:: /samples/sample1.cpp
|
||||||
|
|
||||||
|
User List
|
||||||
|
---------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
How to Contribute Code
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
For further information see :ref:`development`
|
||||||
|
|
||||||
|
.. note:
|
||||||
|
|
||||||
|
|
||||||
|
Other ways to help
|
||||||
|
------------------
|
||||||
|
|
||||||
|
Installation
|
||||||
|
------------
|
||||||
|
|
||||||
|
Getting the source
|
||||||
|
------------------
|
||||||
|
|
||||||
|
Usage examples
|
||||||
|
--------------
|
||||||
|
|
||||||
|
Tutorial
|
||||||
|
++++++++
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 2
|
|
||||||
|
|
||||||
.. doxygenstruct:: xlnt::cell_reference_hash
|
tutorial
|
||||||
:members:
|
|
||||||
|
|
||||||
.. doxygenclass:: xlnt::cell_reference
|
Cookbook
|
||||||
:members:
|
++++++++
|
||||||
|
|
||||||
.. doxygenclass:: xlnt::cell
|
.. toctree::
|
||||||
:members:
|
|
||||||
|
|
||||||
.. doxygenclass:: xlnt::comment
|
cookbook
|
||||||
:members:
|
|
||||||
|
|
||||||
.. doxygenstruct:: xlnt::date
|
Charts
|
||||||
:members:
|
++++++
|
||||||
|
|
||||||
.. doxygenstruct:: xlnt::time
|
.. toctree::
|
||||||
:members:
|
|
||||||
|
|
||||||
.. doxygenstruct:: xlnt::datetime
|
charts/introduction
|
||||||
:members:
|
|
||||||
|
|
||||||
.. doxygenstruct:: xlnt::timedelta
|
Comments
|
||||||
:members:
|
++++++++
|
||||||
|
|
||||||
.. doxygenclass:: xlnt::relationship
|
.. toctree::
|
||||||
:members:
|
|
||||||
|
|
||||||
.. doxygenstruct:: xlnt::zip_info
|
comments
|
||||||
:members:
|
|
||||||
|
|
||||||
.. doxygenclass:: xlnt::zip_file
|
Working with styles
|
||||||
:members:
|
+++++++++++++++++++
|
||||||
|
|
||||||
.. doxygenclass:: xlnt::drawing
|
.. toctree::
|
||||||
:members:
|
|
||||||
|
|
||||||
.. doxygenclass:: xlnt::tokenizer
|
styles
|
||||||
:members:
|
|
||||||
|
|
||||||
.. doxygenclass:: xlnt::translator
|
Conditional Formatting
|
||||||
:members:
|
++++++++++++++++++++++
|
||||||
|
|
||||||
.. doxygenclass:: xlnt::alignment
|
.. toctree::
|
||||||
:members:
|
|
||||||
|
|
||||||
.. doxygenclass:: xlnt::border
|
formatting
|
||||||
:members:
|
|
||||||
|
|
||||||
.. doxygenclass:: xlnt::color
|
Data Validation
|
||||||
:members:
|
+++++++++++++++
|
||||||
|
|
||||||
.. doxygenclass:: xlnt::fill
|
.. toctree::
|
||||||
:members:
|
|
||||||
|
|
||||||
.. doxygenclass:: xlnt::font
|
validation
|
||||||
:members:
|
|
||||||
|
|
||||||
.. doxygenclass:: xlnt::named_style
|
Parsing Formulas
|
||||||
:members:
|
++++++++++++++++
|
||||||
|
|
||||||
.. doxygenclass:: xlnt::number_format
|
.. toctree::
|
||||||
:members:
|
|
||||||
|
|
||||||
.. doxygenclass:: xlnt::protection
|
formula
|
||||||
:members:
|
|
||||||
|
|
||||||
.. doxygenclass:: xlnt::side
|
|
||||||
:members:
|
|
||||||
|
|
||||||
.. doxygenclass:: xlnt::style
|
Information for Developers
|
||||||
:members:
|
--------------------------
|
||||||
|
|
||||||
.. doxygenclass:: xlnt::document_properties
|
.. toctree::
|
||||||
:members:
|
|
||||||
|
|
||||||
.. doxygenclass:: xlnt::document_security
|
development
|
||||||
:members:
|
windows-development
|
||||||
|
|
||||||
.. doxygenclass:: xlnt::manifest
|
API Documentation
|
||||||
:members:
|
------------------
|
||||||
|
|
||||||
.. doxygenclass:: xlnt::named_range
|
.. toctree::
|
||||||
:members:
|
:maxdepth: 2
|
||||||
|
|
||||||
.. doxygenclass:: xlnt::theme
|
api/xlnt
|
||||||
:members:
|
|
||||||
|
|
||||||
.. doxygenclass:: xlnt::workbook
|
|
||||||
:members:
|
|
||||||
|
|
||||||
.. doxygenclass:: xlnt::cell_vector
|
|
||||||
:members:
|
|
||||||
|
|
||||||
.. doxygenclass:: xlnt::column_properties
|
|
||||||
:members:
|
|
||||||
|
|
||||||
.. doxygenstruct:: xlnt::major_order
|
|
||||||
:members:
|
|
||||||
|
|
||||||
.. doxygenclass:: xlnt::page_margins
|
|
||||||
:members:
|
|
||||||
|
|
||||||
.. doxygenstruct:: xlnt::page_setup
|
|
||||||
:members:
|
|
||||||
|
|
||||||
.. doxygenclass:: xlnt::pane
|
|
||||||
:members:
|
|
||||||
|
|
||||||
.. doxygenclass:: xlnt::range_reference
|
|
||||||
:members:
|
|
||||||
|
|
||||||
.. doxygenclass:: xlnt::range
|
|
||||||
:members:
|
|
||||||
|
|
||||||
.. doxygenclass:: xlnt::row_properties
|
|
||||||
:members:
|
|
||||||
|
|
||||||
.. doxygenclass:: xlnt::sheet_protection
|
|
||||||
:members:
|
|
||||||
|
|
||||||
.. doxygenclass:: xlnt::sheet_view
|
|
||||||
:members:
|
|
||||||
|
|
||||||
.. doxygenclass:: xlnt::header
|
|
||||||
:members:
|
|
||||||
|
|
||||||
.. doxygenclass:: xlnt::footer
|
|
||||||
:members:
|
|
||||||
|
|
||||||
.. doxygenclass:: xlnt::header_footer
|
|
||||||
:members:
|
|
||||||
|
|
||||||
.. doxygenstruct:: xlnt::margins
|
|
||||||
:members:
|
|
||||||
|
|
||||||
.. doxygenclass:: xlnt::worksheet
|
|
||||||
:members:
|
|
||||||
|
|
||||||
.. doxygenclass:: xlnt::comment_serializer
|
|
||||||
:members:
|
|
||||||
|
|
||||||
.. doxygenclass:: xlnt::excel_serializer
|
|
||||||
:members:
|
|
||||||
|
|
||||||
.. doxygenclass:: xlnt::manifest_serializer
|
|
||||||
:members:
|
|
||||||
|
|
||||||
.. doxygenclass:: xlnt::relationship_serializer
|
|
||||||
:members:
|
|
||||||
|
|
||||||
.. doxygenclass:: xlnt::shared_strings_serializer
|
|
||||||
:members:
|
|
||||||
|
|
||||||
.. doxygenclass:: xlnt::style_serializer
|
|
||||||
:members:
|
|
||||||
|
|
||||||
.. doxygenclass:: xlnt::theme_serializer
|
|
||||||
:members:
|
|
||||||
|
|
||||||
.. doxygenclass:: xlnt::workbook_serializer
|
|
||||||
:members:
|
|
||||||
|
|
||||||
.. doxygenclass:: xlnt::worksheet_serializer
|
|
||||||
:members:
|
|
||||||
|
|
||||||
.. doxygenclass:: xlnt::xml_document
|
|
||||||
:members:
|
|
||||||
|
|
||||||
.. doxygenclass:: xlnt::xml_node
|
|
||||||
:members:
|
|
||||||
|
|
||||||
.. doxygenclass:: xlnt::xml_serializer
|
|
||||||
:members:
|
|
||||||
|
|
||||||
Indices and tables
|
Indices and tables
|
||||||
==================
|
==================
|
||||||
|
@ -192,3 +134,11 @@ Indices and tables
|
||||||
* :ref:`modindex`
|
* :ref:`modindex`
|
||||||
* :ref:`search`
|
* :ref:`search`
|
||||||
|
|
||||||
|
|
||||||
|
Release Notes
|
||||||
|
=============
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 1
|
||||||
|
|
||||||
|
changes
|
||||||
|
|
33
include/xlnt/formula/translator.hpp
Normal file
33
include/xlnt/formula/translator.hpp
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
namespace xlnt {
|
||||||
|
|
||||||
|
class cell_reference;
|
||||||
|
class tokenizer;
|
||||||
|
|
||||||
|
class translator
|
||||||
|
{
|
||||||
|
translator(const std::string &formula, const cell_reference &ref);
|
||||||
|
|
||||||
|
std::vector<std::string> get_tokens();
|
||||||
|
|
||||||
|
static std::string translate_row(const std::string &row_str, int row_delta);
|
||||||
|
static std::string translate_col(const std::string &col_str, col_delta);
|
||||||
|
|
||||||
|
std::pair<std::string, std::string> strip_ws_name(const std::string &range_str);
|
||||||
|
|
||||||
|
void translate_range(const range_reference &range_ref);
|
||||||
|
void translate_formula(const cell_reference &dest);
|
||||||
|
|
||||||
|
private:
|
||||||
|
const std::string ROW_RANGE_RE;
|
||||||
|
const std::string COL_RANGE_RE;
|
||||||
|
const std::string CELL_REF_RE;
|
||||||
|
|
||||||
|
std::string formula_;
|
||||||
|
cell_reference reference_;
|
||||||
|
tokenizer tokenizer_;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace xlnt
|
Loading…
Reference in New Issue
Block a user