How to read and print text cell by cell in csv file ?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How to read and print text cell by cell in csv file ?

TANDY
firstly See my csv file (test.csv)

test1.csv <http://octave.1599824.n4.nabble.com/file/t373356/test1.csv>  

Now see code i am using,




OUTPUT I GET


Every thing is ok expect Name =0
Name (column 2) have data (S1-101) which is not read by my program because
csvread only read numeric.
i tried /textscan/, /importdata/, /textread/ they all print full sheet data,
but i want result of one by one cell.
Thank you.
/fileread/ also work but it print whole table like

i want output like this





--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html


Reply | Threaded
Open this post in threaded view
|

Re: How to read and print text cell by cell in csv file ?

Andreas Weber-6
Am 20.05.19 um 09:39 schrieb TANDY:

crosspost on stackoverflow:
https://stackoverflow.com/questions/56206114/how-to-read-and-print-text-cell-by-cell-in-csv-file



Reply | Threaded
Open this post in threaded view
|

Re: How to read and print text cell by cell in csv file ?

PhilipNienhuis
In reply to this post by TANDY
TANDY wrote

> firstly See my csv file (test.csv)
>
> test1.csv
> &lt;http://octave.1599824.n4.nabble.com/file/t373356/test1.csv&gt; 
>
> Now see code i am using,
>
>
>
>
> OUTPUT I GET
>
>
> Every thing is ok expect Name =0
> Name (column 2) have data (S1-101) which is not read by my program because
> csvread only read numeric.
> i tried /textscan/, /importdata/, /textread/ they all print full sheet
> data,
> but i want result of one by one cell.
> Thank you.
> /fileread/ also work but it print whole table like
>
> i want output like this
>
>
>
>
>
> --
> Sent from:
> http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html

Maybe try csv2cell (in io package).

Philip



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html