Scilab Website | Contribute with GitLab | Scilab Community | ATOMS toolboxes
Scilab Online Help
2027.0.0 - Português


uiimport

Import data from csv/txt/xlsx 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, TXT or XLSX file to load data.

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

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.

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/XLSX file.

    Import as variable generates a table, timeseries, column vectors, double matrix, string matrix or cell stored in the variable defined in Variable name. The result is displayed in Scilab console.

    Create a function generates a Scilab file with the name "import_" + variable_name + ".sce" saved in the same location as the loaded file. This function contains all commands to create a table, timeseries, column vectors, double matrix, string matrix or cell (variable type selected). This file will automatically appear in Scinotes.

    Help page button opens this page.

  • The user will be able to import data as:

    • a table,

    • a timeseries,

    • column vectors.

    • a double matrix created from variables of type double,

    • a string matrix (converts all types to string)

    • a cell.

    It will be able to specify the output variable name.

    For timeseries, the user must define the time reference. This popupmenu contains only the names of columns with the datetime and duration type.

  • File information as number of rows and columns.

    For CSV/TXT files, uiimport automatically detects the delimiter and decimal separator of the file. The user can change them using the popupmenus.

    The number of header lines can be set by the user.

    The delimiter popupmenu contains the value "Custom". It allows the user to specify another delimiter.

    For XLSX files, the user can select the sheet to import using the Sheet popupmenu. The delimiter and decimal separator options are not available for XLSX files.

  • Select the columns to import

    Each column can be selected/deselected and renamed. Each change update the preview panel.

  • Data Conversion.

    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

Examples

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

See also

History

VersãoDescrição
2027.0.0
  • uiimport has been rewritten with the uicontrol browser.

  • XLSX files are now supported.

2024.1.0

Introduction in Scilab.

Report an issue
<< News feed UI Data Gerenciamento de ajuda online >>

Copyright (c) 2022-2026 (Dassault Systèmes S.E.)
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:
Thu Oct 15 11:20:00 CEST 2026