.. highlightlang:: us .. index:: auto_ImportData .. _auto_importdata: auto_ImportData =============== .. us.tag auto_ImportData ENGLISH :ref:`auto_ImportData` opens a data file and converts it to a UniPlot data file (.nc2). The netCDF file is saved in the directory of the source data file or in the directory specified in :ref:`tools-more-options` dialog. The function can be used to import data from all supported file formats (Text-, Excel-, netCDF-Files etc.). For Excel files, the table name can be specified as the second parameter. .. function:: ssFileNameNC = auto_ImportData(ssFileName) ssFileNameNC = auto_ImportData(ssFileName, ssExcelTable) .. us.return **Return Value** *ssFileNameNC* is the name of the created UniPlot data file. Example: If the name of the source data file is :file:`"c:/test/test1.dat"`, then *ssFileNameNC* is :file:`"c:/test/test1.nc2"`. If a directory is given in :ref:`tools-more-options` under **netCDF-data file directory**, the NC files can be saved in the specified directory. If the data import fails the function returns an empty string (``""``). .. us.params **Parameters** .. uparam:: ssFileName *ssFileName* is the complete file name with drive and path. The single components of the file name will be separated by either a slash (``"/"``) or a double backslach (``"\"``). If *ssFileName* is the name of an Excel file, the name of the Excel table can follow the file name in square brackets. Example: ``auto_ImportData("c:/test/test1.xls [Sheet 1]")``. In this case, the table name should not be given again as the second parameter. .. uparam:: ssExcelTable *ssExcelTable* is the name of an Excel file table. Table names are not case sensitive. If a table name is not given, the first table will be imported. The parameter *ssExcelTable* will be ignored for other than Excel files. .. us.example **Example** .. include:: ../include/test_auto_ImportData.ic .. seealso:: :ref:`overview-automation` :sub:`id-1416287`