.. include:: ../substitutions

.. oe:namespace:: OEMolProp

.. meta::
   :keywords: OEWritePropertyDataToCSV

.. _OEMolProp_OEWritePropertyDataToCSV:

.. oe:function:: OEWritePropertyDataToCSV

   .. oe:language:: c++ java csharp

      .. oe:api::

         bool OEWritePropertyDataToCSV(const std::string& fname,
                                       OEChem::oemolistream& ifs,
                                       OEMolProp::OEFilter& filter)
         bool OEWritePropertyDataToCSV(OEChem::oemolostream& ofs,
                                       OEChem::oemolistream& ifs,
                                       OEMolProp::OEFilter& filter)

   .. oe:language:: python

      .. oe:api:: python

         OEWritePropertyDataToCSV(fname: str, ifs: oemolistream,
                                  filter: OEFilter) -> bool
         OEWritePropertyDataToCSV(ofs: oemolostream, ifs: oemolistream,
                                  filter: OEFilter) -> bool

   Write the molecular properties calculated by :ref:`OEFilter <OEMolProp_OEFilter>` to the output file ``fname``
   or to the stream ``ofs`` in the :oe:const:`OEChem::OEFormat::CSV` format. Returns ``true`` if the output 
   CSV file was successfully written, ``false`` otherwise.

   Molecules are read in from the input stream ``ifs``. The output CSV file can be read by the 
   :oe:func:`OEChem::OEReadCSVFile` function.

   .. seealso::

      * :ref:`section_moltaggeddata_CSV` section

   .. admonition:: Code Example

      * :ref:`molprop_examples_molpropcsv` example
