Is There an .xml Format File that Excel Can Read

0

I'd like to use C++ to generate an Excel file.

I know that Excel can read .csv files, but I was looking for something with more power. For example, the ability to create separate sheets and insert equations into cells.

Is there a format available to me for this?

Jonathan Mee

Posted 2016-02-05T14:07:07.487

Reputation: 169

Answers

1

Yes, Excel can read XML files, see: Overview of XML in Excel:

Overview of how Excel works with XML data

  1. Adding an XML schema file (.xsd) to a workbook.
  2. Mapping XML schema elements to individual cells or XML tables
  3. Importing an XML data file (.xml) and binding the XML elements to mapped cells.
  4. Entering data, moving mapped cells, and leveraging Excel functionality, while preserving XML structure and definitions.
  5. Exporting revised data from mapped cells to an XML data file.

You can for example use the LibXl library to read and write Excel (xml) files, or the SimpleXlsxWriter library.

agold

Posted 2016-02-05T14:07:07.487

Reputation: 238