# Import csv file and create chart

**URL:** <https://scilab.discourse.group/t/import-csv-file-and-create-chart/850>\
**Category:** Data handling\
**Created:** [March 3, 2025, 6:38am UTC](https://scilab.discourse.group/t/import-csv-file-and-create-chart/850 "2025-03-03T06:38:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![frankdunn](https://avatars.discourse-cdn.com/v4/letter/f/d78d45/32.png) [@frankdunn](https://scilab.discourse.group/u/frankdunn)\
**Post date:** [March 3, 2025, 6:38am UTC](https://scilab.discourse.group/t/import-csv-file-and-create-chart/850/1 "2025-03-03T06:38:44Z")

</div>

I want to import a csv file and plot some of the column data. Is there a example how to do this. I could do it with the older import tool but uiimport is not the same as the older uiSpreadsheet.

---

<div class="post-metadata">

**Author:** ![philipp](https://yyz2.discourse-cdn.com/free1/user_avatar/scilab.discourse.group/philipp/32/53_2.png) [@philipp](https://scilab.discourse.group/u/philipp)\
**Post date:** [March 4, 2025, 7:22am UTC](https://scilab.discourse.group/t/import-csv-file-and-create-chart/850/2 "2025-03-04T07:22:33Z")

</div>

what about `csvRead` and `plot` ?

---

<div class="post-metadata">

**Author:** ![frankdunn](https://avatars.discourse-cdn.com/v4/letter/f/d78d45/32.png) [@frankdunn](https://scilab.discourse.group/u/frankdunn)\
**Post date:** [March 4, 2025, 11:57am UTC](https://scilab.discourse.group/t/import-csv-file-and-create-chart/850/3 "2025-03-04T11:57:16Z")

</div>

I reinstalled version 6.1.1 to see how uiSpreadsheet and uiimport differ. I see there are no options to convert in uiimport; in my case, I converted to double in uiSpreadsheet.

Here is the function generated by uiSpreadsheet. This creates a variable containing values of type double.

```auto
clear importdata; 
 
function [data] = importdata(filename) 
    data = csvRead(filename, ";", ",", "double"); 
endfunction 
 
[data] = importdata("F:\2857-0570_Rog\20250212_144220_log.csv"); ` 

```

Here is the function generated by uiimport. This creates a variable containing a table which cannot be plotted without further processing.

```auto
clear import_20250212_144220_log;

function [data] = import_20250212_144220_log(filename)
    opts = detectImportOptions(filename, "Delimiter", ";", "Decimal", ",");
    data = readtable(filename, opts, "VariableNames", ["Date","Time","L1 Current / A","L2 Current / A","L3 Current / A","L1 Voltage / V","L2 Voltage / V","L3 Voltage / V","L1 Active Power / W","L2 Active Power / W","L3 Active Power / W"]);
    data.Date.format = "dd.MM.yy";
    data.Time.format = "hh:mm:ss";
endfunction

data = import_20250212_144220_log("F:\2857-0570_Rog\20250212_144220_log.csv");

```

Is there any tool similar to uiSpreadsheet in later versions of scilab?
