// Copyright (c) 2014-2020 Thomas Fussell
// Copyright (c) 2010-2015 openpyxl
//
// 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 <functional>
#include <iterator>
#include <map>
#include <memory>
#include <string>
#include <unordered_map>
#include <utility>
#include <vector>
#include <xlnt/xlnt_config.hpp>
#include <xlnt/cell/rich_text.hpp>
namespace xlnt {
enum class calendar;
enum class core_property;
enum class extended_property;
enum class relationship_type;
class alignment;
class border;
class calculation_properties;
class cell;
class cell_style;
class color;
class const_worksheet_iterator;
class fill;
class font;
class format;
class rich_text;
class manifest;
class metadata_property;
class named_range;
class number_format;
class path;
class pattern_fill;
class protection;
class range;
class range_reference;
class relationship;
class streaming_workbook_reader;
class style;
class style_serializer;
class theme;
class variant;
class workbook_view;
class worksheet;
class worksheet_iterator;
class zip_file;
struct datetime;
namespace detail {
struct stylesheet;
struct workbook_impl;
class xlsx_consumer;
class xlsx_producer;
} // namespace detail
/// <summary>
/// workbook is the container for all other parts of the document.
/// </summary>
class XLNT_API workbook
{
public:
/// <summary>
/// typedef for the iterator used for iterating through this workbook
/// (non-const) in a range-based for loop.
/// </summary>
using iterator = worksheet_iterator;
/// <summary>
/// typedef for the iterator used for iterating through this workbook
/// (const) in a range-based for loop.
/// </summary>
using const_iterator = const_worksheet_iterator;
/// <summary>
/// typedef for the iterator used for iterating through this workbook
/// (non-const) in a range-based for loop in reverse order using
/// std::make_reverse_iterator.
/// </summary>
using reverse_iterator = std::reverse_iterator<iterator>;
/// <summary>
/// typedef for the iterator used for iterating through this workbook
/// (const) in a range-based for loop in reverse order using
/// std::make_reverse_iterator.
/// </summary>
using const_reverse_iterator = std::reverse_iterator<const_iterator>;
/// <summary>
/// Constructs and returns an empty workbook similar to a default.
/// Excel workbook
/// </summary>
static workbook empty();
// Constructors
/// <summary>
/// Default constructor. Constructs a workbook containing a single empty
/// worksheet using workbook::empty().
/// </summary>
workbook();
/// <summary>
/// load the xlsx file at path
/// </summary>
workbook(const xlnt::path &file);
/// <summary>
/// load the encrpyted xlsx file at path
/// </summary>
workbook(const xlnt::path &file, const std::string &password);
/// <summary>
/// construct the workbook from any data stream where the data is the binary form of a workbook
/// </summary>
workbook(std::istream &data);
/// <summary>
/// construct the workbook from any data stream where the data is the binary form of an encrypted workbook
/// </summary>
workbook(std::istream &data, const std::string &password);
/// <summary>
/// Move constructor. Constructs a workbook from existing workbook, other.
/// </summary>
workbook(workbook &&other);
/// <summary>
/// Copy constructor. Constructs this workbook from existing workbook, other.
/// </summary>
workbook(const workbook &other);
/// <summary>
/// Destroys this workbook, deallocating all internal storage space. Any pimpl
/// wrapper classes (e.g. cell) pointing into this workbook will be invalid
/// after this is executed.
/// </summary>
~workbook();
// Worksheets
/// <summary>
/// Creates and returns a sheet after the last sheet in this workbook.
/// </summary>
worksheet create_sheet();
/// <summary>
/// Creates and returns a sheet at the specified index.
/// </summary>
worksheet create_sheet(std::size_t index);
/// <summary>
/// TODO: This should be private...
/// </summary>
worksheet create_sheet_with_rel(const std::string &title, const relationship &rel);
/// <summary>
/// Creates and returns a new sheet after the last sheet initializing it
/// with all of the data from the provided worksheet.
/// </summary>
worksheet copy_sheet(worksheet worksheet);
/// <summary>
/// Creates and returns a new sheet at the specified index initializing it
/// with all of the data from the provided worksheet.
/// </summary>
worksheet copy_sheet(worksheet worksheet, std::size_t index);
/// <summary>
/// Returns the worksheet that is determined to be active. An active
/// sheet is that which is initially shown by the spreadsheet editor.
/// </summary>
worksheet active_sheet();
/// <summary>
/// Returns the worksheet with the given name. This may throw an exception
/// if the sheet isn't found. Use workbook::contains(const std::string &)
/// to make sure the sheet exists before calling this method.
/// </summary>
worksheet sheet_by_title(const std::string &title);
/// <summary>
/// Returns the worksheet with the given name. This may throw an exception
/// if the sheet isn't found. Use workbook::contains(const std::string &)
/// to make sure the sheet exists before calling this method.
/// </summary>
const worksheet sheet_by_title(const std::string &title) const;
/// <summary>
/// Returns the worksheet at the given index. This will throw an exception
/// if index is greater than or equal to the number of sheets in this workbook.
/// </summary>
worksheet sheet_by_index(std::size_t index);
/// <summary>
/// Returns the worksheet at the given index. This will throw an exception
/// if index is greater than or equal to the number of sheets in this workbook.
/// </summary>
const worksheet sheet_by_index(std::size_t index) const;
/// <summary>
/// Returns the worksheet with a sheetId of id. Sheet IDs are arbitrary numbers
/// that uniquely identify a sheet. Most users won't need this.
/// </summary>
worksheet sheet_by_id(std::size_t id);
/// <summary>
/// Returns the worksheet with a sheetId of id. Sheet IDs are arbitrary numbers
/// that uniquely identify a sheet. Most users won't need this.
/// </summary>
const worksheet sheet_by_id(std::size_t id) const;
/// <summary>
/// Returns the hidden identifier of the worksheet at the given index.
/// This will throw an exception if index is greater than or equal to the
/// number of sheets in this workbook.
/// </summary>
boo
没有合适的资源?快使用搜索试试~ 我知道了~
xlnt_installed_xlnt_xlntexcel_源码
共75个文件
hpp:68个
cmake:4个
lib:1个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 54 浏览量
2021-10-04
02:38:17
上传
评论
收藏 906KB ZIP 举报
温馨提示
xlnt是c++编写的开源excel操作工具,支持c++14标准。可以方便的通过代码的方式操作excel表格。vs2015编译。
资源详情
资源评论
资源推荐
收起资源包目录
xlnt_installed.zip (75个子文件)
installed
bin
xlnt.dll 1.79MB
include
xlnt
workbook
worksheet_iterator.hpp 8KB
external_book.hpp 1KB
streaming_workbook_reader.hpp 5KB
workbook_view.hpp 4KB
calculation_properties.hpp 2KB
document_security.hpp 3KB
workbook.hpp 29KB
streaming_workbook_writer.hpp 4KB
theme.hpp 1KB
metadata_property.hpp 2KB
named_range.hpp 3KB
packaging
ext_list.hpp 3KB
manifest.hpp 7KB
relationship.hpp 5KB
uri.hpp 7KB
xlnt.hpp 3KB
drawing
spreadsheet_drawing.hpp 2KB
cell
phonetic_run.hpp 2KB
cell_type.hpp 2KB
cell_reference.hpp 9KB
index_types.hpp 10KB
rich_text.hpp 5KB
hyperlink.hpp 2KB
cell.hpp 20KB
rich_text_run.hpp 2KB
comment.hpp 5KB
styles
style.hpp 8KB
font.hpp 8KB
alignment.hpp 5KB
border.hpp 6KB
format.hpp 7KB
conditional_format.hpp 4KB
color.hpp 9KB
protection.hpp 3KB
fill.hpp 10KB
number_format.hpp 7KB
xlnt_config.hpp 2KB
worksheet
sheet_protection.hpp 2KB
page_setup.hpp 5KB
cell_iterator.hpp 10KB
range.hpp 9KB
selection.hpp 4KB
phonetic_pr.hpp 4KB
sheet_pr.hpp 3KB
sheet_view.hpp 6KB
pane.hpp 3KB
header_footer.hpp 10KB
worksheet.hpp 25KB
page_margins.hpp 3KB
print_options.hpp 2KB
column_properties.hpp 2KB
range_reference.hpp 6KB
row_properties.hpp 3KB
cell_vector.hpp 7KB
range_iterator.hpp 8KB
sheet_format_properties.hpp 2KB
major_order.hpp 1KB
utils
exceptions.hpp 9KB
variant.hpp 5KB
path.hpp 7KB
numeric.hpp 7KB
datetime.hpp 4KB
calendar.hpp 1KB
date.hpp 3KB
time.hpp 3KB
timedelta.hpp 2KB
optional.hpp 10KB
scoped_enum_hash.hpp 2KB
share
man
man3
xlnt.3 61KB
lib
cmake
xlnt
XlntTargets.cmake 3KB
XlntTargets-release.cmake 866B
XlntConfig.cmake 1KB
XlntConfigVersion.cmake 2KB
xlnt.lib 615KB
共 75 条
- 1
食肉库玛
- 粉丝: 57
- 资源: 4740
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0