MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Reading csv with ;



Hi Dennis,

assume we have a file:

1;2

3;4

we can read this by e.g.:



Import["d:/tmp/t.txt", "Table", "FieldSeparators" -> {";"}]



The magic word is "FieldSeparators".

Daniel



Dennis wrote:

> I'm trying to read a csv with mathematicaâ?¦

> 

> Now the problem is that my system settings are at ";" as seperator instead of more traditional ",". So the it effectively looks like 1;1;1;1 instead of 1,1,1,1

> 

> Normally this makes not difference as in most software you can choose the delimiter/seperator before reading a file, so you pick â??separator = ;â?? or whatever.

> 

> With mathematica however I have so far been unable to do this. Now the question of course: how so I change the seperator with mathematica?

> 

> Because quite a few files have a â??;â?? separator I would like to find a solution within mathematica instead of changing the system settings.

> 

> Cheers,

> 

> Dennis

> 




  • Prev by Date: Re: defining consecutive variables
  • Next by Date: Re: Reading csv with ;
  • Previous by thread: Re: Reading csv with ;
  • Next by thread: Re: Re: Reading csv with ;