# How to write to file Array Any lika 1 row?

**URL:** <https://discourse.julialang.org/t/how-to-write-to-file-array-any-lika-1-row/1618>\
**Category:** General Usage\
**Created:** [January 20, 2017, 5:14pm UTC](https://discourse.julialang.org/t/how-to-write-to-file-array-any-lika-1-row/1618 "2017-01-20T17:14:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![programista](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/programista/32/5372_2.png) [@programista](https://discourse.julialang.org/u/programista)\
**Post date:** [January 20, 2017, 5:14pm UTC](https://discourse.julialang.org/t/how-to-write-to-file-array-any-lika-1-row/1618/1 "2017-01-20T17:14:01Z")

</div>

How to write to file Array Any lika 1 row without any null etc… jus body like one row  
julia\> f = open(“tmp/tmp.txt”, “w”)  
IOStream(\<file tmp/tmp.txt\>)  
julia\> write(f, temp\_rekord)  
133  
julia\> close(f)  
julia\> temp\_rekord  
9-element Array{Any,1}:  
1  
“100121”  
“601204011111000000000010171111101111100000004111611E11110101111111111110”  
“4385.37”  
5  
0  
0  
0  
0

julia\> eltype(temp\_rekord)  
Any  
julia\> typeof(temp\_rekord)  
Array{Any,1}

After in file is may rubish, null~`s tect

Paul

---

<div class="post-metadata">

**Author:** ![Simon\_Bolland](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/simon_bolland/32/8920_2.png) [@Simon\_Bolland](https://discourse.julialang.org/u/Simon_Bolland)\
**Post date:** [January 21, 2017, 9:13am UTC](https://discourse.julialang.org/t/how-to-write-to-file-array-any-lika-1-row/1618/2 "2017-01-21T09:13:53Z")

</div>

Does this do what you want?

```julia
f = open("tmp/tmp.txt", "w")
writedlm(f,reshape(temp_rekord,(1,9))," ")
close(f)

```

---

<div class="post-metadata">

**Author:** ![programista](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/programista/32/5372_2.png) [@programista](https://discourse.julialang.org/u/programista)\
**Post date:** [January 21, 2017, 7:15pm UTC](https://discourse.julialang.org/t/how-to-write-to-file-array-any-lika-1-row/1618/3 "2017-01-21T19:15:11Z")

</div>

Thx, something similar:)  
Paul

W dniu 2017-01-21 10:17, Simon Bolland pisze:
