Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
2024.1.0 - Русский


uiimport

Import data from csv/txt file

Syntax

uiimport()
uiimport(filename)

Arguments

filename

a string: name or path of file

Description

uiimport opens a Scilab application which asks you to select the CSV or TXT file to load data.

uiimport(filename) directly imports data in the application from filename.

From this function, the user will be able to import data either in a table or in a timeseries

This application is also available in Scilab console menu: Applications > Import Data.

It is divided into two parts: preview (center panel) and options management (left panel). Changes made in the left panel update the preview.

The preview panel displays a part of data if the number of lines exceeds 29 (the first 14 lines (excluding header and column names) and the last 14 lines of the file). In this case, "..." is added for each column.

uiimport has several features:

  • Four buttons to select a file, import as variable, create a function and open help page.

    Select a file loads data from CSV/TXT file.

    Import as variable generates a table or timeseries from data and setted options stored in the ans variable. The result is displayed in Scilab console.

    Create a function generates a Scilab file with the name "import_" + filename + ".sce" saved in the same location as the loaded file. This function contains all commands to create a table or timeseries. This file will automatically appear in Scinotes.

    Help page button opens this page

  • File information as number of rows and columns.

    uiimport automatically detects the delimiter and decimal separator of the file. But the user can change them using the popupmenus.

  • Select the columns to import

    Each column can be selected/deselected and renamed. Each change update the preview panel. The empty column in file will not be taken into account.

  • Time reference and columns format.

    The drop-down list contains all column names of double, datetime and duration type. By default, no column is selected. Depending on the column type, the user will be able to

    • change the input and output format for the datetime and duration types

    • convert the double into duration using the drop-down list

    There is also a checkbox to select the reference time column needed to create a timeseries.

Examples

uiimport(fullfile(SCI, "modules", "spreadsheet", "tests", "unit_tests","meteo_data_bordeaux.csv"));

See also

History

ВерсияОписание
2024.1.0 Introduction in Scilab.
Report an issue
<< News feed UI Data Online help management >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Jun 17 17:55:12 CEST 2024