From 337674199690f688394392c540df9b40d037b77c Mon Sep 17 00:00:00 2001 From: Thomas Fussell Date: Thu, 21 Jul 2016 23:25:24 -0400 Subject: [PATCH] work on docs --- docs/api/xlnt.cell.rst | 8 +++++ docs/api/xlnt.packaging.rst | 8 +++-- docs/api/xlnt.serialization.rst | 41 ---------------------- docs/api/xlnt.styles.rst | 19 ++++++++--- docs/api/xlnt.utils.rst | 55 +++++++++++++++++------------- docs/api/xlnt.workbook.rst | 6 ++++ docs/api/xlnt.worksheet.rst | 45 +++++++++++++++++------- docs/index.rst | 20 ++--------- include/xlnt/workbook/encoding.hpp | 42 ----------------------- samples/sample.cpp | 16 ++++++++- 10 files changed, 116 insertions(+), 144 deletions(-) delete mode 100644 docs/api/xlnt.serialization.rst delete mode 100644 include/xlnt/workbook/encoding.hpp diff --git a/docs/api/xlnt.cell.rst b/docs/api/xlnt.cell.rst index 01b87a8c..e716f7aa 100644 --- a/docs/api/xlnt.cell.rst +++ b/docs/api/xlnt.cell.rst @@ -7,6 +7,9 @@ Cell Module .. doxygenclass:: xlnt::cell_reference :members: +.. doxygenclass:: xlnt::cell_type + :members: + .. doxygenclass:: xlnt::cell :members: @@ -21,3 +24,8 @@ Cell Module .. doxygenstruct:: xlnt::column_hash :members: +.. doxygenclass:: xlnt::text + :members: + +.. doxygenclass:: xlnt::text_run + :members: diff --git a/docs/api/xlnt.packaging.rst b/docs/api/xlnt.packaging.rst index eb21f7ef..f4ccc3b1 100644 --- a/docs/api/xlnt.packaging.rst +++ b/docs/api/xlnt.packaging.rst @@ -1,18 +1,21 @@ Packaging Module ================ -.. doxygenclass:: xlnt::document_properties +.. doxygenclass:: xlnt::app_properties :members: .. doxygenclass:: xlnt::default_type :members: -.. doxygenclass:: xlnt::override_type +.. doxygenclass:: xlnt::document_properties :members: .. doxygenclass:: xlnt::manifest :members: +.. doxygenclass:: xlnt::override_type + :members: + .. doxygenclass:: xlnt::relationship :members: @@ -21,4 +24,3 @@ Packaging Module .. doxygenclass:: xlnt::zip_file :members: - diff --git a/docs/api/xlnt.serialization.rst b/docs/api/xlnt.serialization.rst deleted file mode 100644 index e65b405b..00000000 --- a/docs/api/xlnt.serialization.rst +++ /dev/null @@ -1,41 +0,0 @@ -Serialization Module -==================== - -.. doxygenclass:: xlnt::comment_serializer - :members: - -.. doxygenenum:: xlnt::encoding - :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: diff --git a/docs/api/xlnt.styles.rst b/docs/api/xlnt.styles.rst index bdfe2f66..e3bd4066 100644 --- a/docs/api/xlnt.styles.rst +++ b/docs/api/xlnt.styles.rst @@ -4,7 +4,10 @@ Styles Module .. doxygenclass:: xlnt::alignment :members: -.. doxygenenum:: xlnt::border +.. doxygenclass:: xlnt::base_format + :members: + +.. doxygenenum:: xlnt::border_style :members: .. doxygenclass:: xlnt::border @@ -13,13 +16,19 @@ Styles Module .. doxygenclass:: xlnt::color :members: +.. doxygenenum:: xlnt::diagonal_direction + :members: + .. doxygenclass:: xlnt::fill :members: .. doxygenclass:: xlnt::font :members: -.. doxygenclass:: xlnt::named_style +.. doxygenclass:: xlnt::format + :members: + +.. doxygenenum:: xlnt::horizontal_alignment :members: .. doxygenclass:: xlnt::number_format @@ -28,11 +37,11 @@ Styles Module .. doxygenclass:: xlnt::protection :members: -.. doxygenenum:: xlnt::border_style - :members: - .. doxygenclass:: xlnt::side :members: .. doxygenclass:: xlnt::style :members: + +.. doxygenenum:: xlnt::vertical_alignment + :members: diff --git a/docs/api/xlnt.utils.rst b/docs/api/xlnt.utils.rst index 516bec35..296104e8 100644 --- a/docs/api/xlnt.utils.rst +++ b/docs/api/xlnt.utils.rst @@ -1,46 +1,55 @@ Utilities Module ================ -.. doxygenstruct:: xlnt::date +.. doxygenclass:: xlnt::attribute_error :members: -.. doxygenstruct:: xlnt::time +.. doxygenenum:: xlnt::calendar + :members: + +.. doxygenclass:: xlnt::cell_coordinates_error + :members: + +.. doxygenclass:: xlnt::column_string_index_error + :members: + +.. doxygenclass:: xlnt::data_type_error + :members: + +.. doxygenstruct:: xlnt::date :members: .. doxygenstruct:: xlnt::datetime :members: -.. doxygenstruct:: xlnt::timedelta - :members: - -.. doxygenclass:: xlnt::cell_coordinates_exception - :members: - .. doxygenclass:: xlnt::illegal_character_error :members: -.. doxygenclass:: xlnt::column_string_index_exception +.. doxygenclass:: xlnt::invalid_file_error :members: -.. doxygenclass:: xlnt::data_type_exception - :members: - -.. doxygenclass:: xlnt::named_range_exception - :members: - -.. doxygenclass:: xlnt::sheet_title_exception - :members: - -.. doxygenclass:: xlnt::invalid_file_exception - :members: - -.. doxygenclass:: xlnt::read_only_workbook_exception +.. doxygenclass:: xlnt::key_error :members: .. doxygenclass:: xlnt::missing_number_format :members: -.. doxygenclass:: xlnt::attribute_error +.. doxygenclass:: xlnt::named_range_error + :members: + +.. doxygenclass:: xlnt::read_only_workbook_error + :members: + +.. doxygenclass:: xlnt::sheet_title_error + :members: + +.. doxygenstruct:: xlnt::time + :members: + +.. doxygenstruct:: xlnt::timedelta + :members: + +.. doxygenclass:: xlnt::utf8string :members: .. doxygenclass:: xlnt::value_error diff --git a/docs/api/xlnt.workbook.rst b/docs/api/xlnt.workbook.rst index 2c88ea5c..9eb3d87c 100644 --- a/docs/api/xlnt.workbook.rst +++ b/docs/api/xlnt.workbook.rst @@ -1,6 +1,9 @@ Workbook Module =============== +.. doxygenclass:: xlnt::const_worksheet_iterator + :members: + .. doxygenclass:: xlnt::document_security :members: @@ -15,3 +18,6 @@ Workbook Module .. doxygenclass:: xlnt::workbook :members: + +.. doxygenclass:: xlnt::worksheet_iterator + :members: diff --git a/docs/api/xlnt.worksheet.rst b/docs/api/xlnt.worksheet.rst index afaf7ceb..10951344 100644 --- a/docs/api/xlnt.worksheet.rst +++ b/docs/api/xlnt.worksheet.rst @@ -4,12 +4,36 @@ Worksheet Module .. doxygenclass:: xlnt::cell_vector :members: +.. doxygenclass:: xlnt::cell_iterator + :members: + .. doxygenclass:: xlnt::column_properties :members: +.. doxygenclass:: xlnt::const_cell_iterator + :members: + +.. doxygenclass:: xlnt::const_range_iterator + :members: + +.. doxygenclass:: xlnt::footer + :members: + +.. doxygenclass:: xlnt::header_footer + :members: + +.. doxygenclass:: xlnt::header + :members: + .. doxygenenum:: xlnt::major_order :members: +.. doxygenenum:: xlnt::orientation + :members: + +.. doxygenenum:: xlnt::page_break + :members: + .. doxygenclass:: xlnt::page_margins :members: @@ -19,6 +43,12 @@ Worksheet Module .. doxygenclass:: xlnt::pane :members: +.. doxygenenum:: xlnt::paper_size + :members: + +.. doxygenclass:: xlnt::range_iterator + :members: + .. doxygenclass:: xlnt::range_reference :members: @@ -34,23 +64,14 @@ Worksheet Module .. doxygenclass:: xlnt::sheet_protection :members: +.. doxygenenum:: xlnt::sheet_state + :members: + .. doxygenclass:: xlnt::sheet_view :members: .. doxygenclass:: xlnt::worksheet_properties :members: -.. doxygenclass:: xlnt::header - :members: - -.. doxygenclass:: xlnt::footer - :members: - -.. doxygenclass:: xlnt::header_footer - :members: - -.. doxygenstruct:: xlnt::margins - :members: - .. doxygenclass:: xlnt::worksheet :members: diff --git a/docs/index.rst b/docs/index.rst index 5c4c6ffe..51264f29 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -14,11 +14,7 @@ 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. +xlnt is a C++14 library for reading, writing, and modifying XLSX files as described in [ECMA 376](http://www.ecma-international.org/publications/standards/Ecma-376.htm). The API is based on [openpyxl](https://bitbucket.org/openpyxl/openpyxl), a Python library to read/write Excel 2007 xlsx/xlsm files, and ultimately on [PHPExcel](https://github.com/PHPOffice/PHPExcel), pure PHP library for reading and writing spreadsheet files upon which openpyxl was based. This project is still very much a work in progress, but the core development work is complete. Support +++++++ @@ -26,23 +22,13 @@ Support Sample code: ++++++++++++ -.. literalinclude:: /samples/sample1.cpp - -User List ---------- - +.. literalinclude:: /samples/sample.cpp How to Contribute Code ---------------------- -For further information see :ref:`development` - -.. note: - - -Other ways to help ------------------- +See :ref:`development` Installation ------------ diff --git a/include/xlnt/workbook/encoding.hpp b/include/xlnt/workbook/encoding.hpp deleted file mode 100644 index c47ce009..00000000 --- a/include/xlnt/workbook/encoding.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2014-2016 Thomas Fussell -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, WRISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE -// -// @license: http://www.opensource.org/licenses/mit-license.php -// @author: see AUTHORS file -#pragma once - -#include - -namespace xlnt { - -/// -/// Specifies the encoding used in a worksheet. -/// This isn't really supported yet. -/// -enum class XLNT_CLASS encoding -{ - utf8, - latin1, - utf16, - utf32, - ascii -}; - -} // namespace xlnt diff --git a/samples/sample.cpp b/samples/sample.cpp index b20572d1..d4a9abd6 100644 --- a/samples/sample.cpp +++ b/samples/sample.cpp @@ -1 +1,15 @@ -sample.cpp \ No newline at end of file +#include + +int main() +{ + xlnt::workbook wb; + xlnt::worksheet ws = wb.get_active_sheet(); + ws.get_cell("A1").set_value(5); + ws.get_cell("B2").set_value("string data"); + ws.get_cell("C3").set_formula("=RAND()"); + ws.merge_cells("C3:C4"); + ws.freeze_panes("B2"); + wb.save("book1.xlsx"); + + return 0; +}