Open Source C++ Library for Excel Spreadsheet 

Read, Write, Edit and Convert Microsoft Excel Spreadsheet files via Open Source C++ API.

 

OpenXLSX is an open source C++ library that gives computer programmers the power to read, write, create and modify Excel files as well as data formatting with lesser dependencies. It is a work in progress and aims to provide all the important features for spreadsheet creation and manipulation.

OpenXLSX provides support for several important features, such as Create, open and save spreadsheet files, read or write & modify cell contents, Copy cells and cell ranges, Copy worksheets & many more. OpenXLSX can be built and run on several platforms such as Windows, Linux & Linux.

Getting Started with OpenXLSX

The current stable version is available on CRAN. Please use the following command to install it.

Install OpenXLSX via CRAN

 install.packages("openxlsx", dependencies = TRUE) 

Development version

install.packages("openxlsx", dependencies = TRUE) 
require(devtools)
install_github("ycphs/openxlsx")

C++ API to Create & Modify Spreadsheet Files

The open source API OpenXLSX enables programmers to generate an excel spreadsheet from scratch. It also provides support for modifying the existing spreadsheet with ease. To modify an existing file you need to open it and insert the data you want to include in the files. You can create a new worksheet and add it to the empty workbook, add data to it and much more. You can also assign a name to the sheet and can also add content to it.

Protect Workbook or Worksheet

Evert organizations work hard to collect their require data and don’t want anyone to play with their data.  OpenXLSX provides developers the functionality to preventing people from editing various parts of a workbook. You can protect it by providing a password to limit who can even open it. It is always useful to protect a certain part of a workbook and let the users make changes to other parts when required.

Manage Worksheet Column Widths

The Open source API OpenXLSX enables software programmers to set worksheet column widths to a specific width or "auto" for automatic width sizing. We can use widths = “auto” in the setColWidths function to auto-widen the column based on the data. You can also use merge cells to create a header for the data frame’s column headers. It also provides features for hiding the columns.