Import and format CSV file
Show older comments
Hi,
I have problems to import and convert formats in matlab, I have a CSV file containing six columns, are in separate bank format for point(.), as follows:
Column 1 = Date and Time
Column 2 = opening
Column 3 = Maximum
Column 4 = closure
Column 4 = min
Column 5 = volume
clc;
clear all;
filename='D:\BD\Bars.csv';
DataHora= xlsread(filename,'','A:A'); %%tentativa 1
Abertura= xlsread(filename,'','B:B'); %%tentativa 1
%[DataHora Abertura ] = csvimport(filename, 'columns', {'A', 'B'});%%tentativa 2
disp(DataHora);
disp(Abertura);
======= presented results======
NaN;
NaN;
NaN;
NaN;
......
2008.01.02 00:00:00 33.18 33.46 32.76 33.18 7590
2008.01.03 00:00:00 33.06 33.27 32.53 32.53 6481
2008.01.04 00:00:00 32.66 32.93 30.85 31.04 14691
2008.01.07 00:00:00 31.07 31.16 29.99 30.13 11876
2008.01.08 00:00:00 30.62 32.27 30.61 31.79 11812
2008.01.09 00:00:00 31.69 32.39 31.37 32.39 9517
2008.01.10 00:00:00 32.41 32.6 31.41 32.07 12151
2008.01.11 00:00:00 31.73 32.14 31.1 31.1 8433
2008.01.14 00:00:00 31.43 31.54 30.77 31.04 7677
2008.01.15 00:00:00 30.62 30.77 29.55 29.67 17279
1 Comment
Image Analyst
on 14 Dec 2014
Accepted Answer
More Answers (2)
Categories
Find more on Large Files and Big Data in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!