# JLD file and Strings, how to ADD new line to STRING Array to existing jld file

**URL:** <https://discourse.julialang.org/t/jld-file-and-strings-how-to-add-new-line-to-string-array-to-existing-jld-file/31475>\
**Category:** General Usage\
**Created:** [November 25, 2019, 7:02am UTC](https://discourse.julialang.org/t/jld-file-and-strings-how-to-add-new-line-to-string-array-to-existing-jld-file/31475 "2019-11-25T07:02:35Z")\
**Posts on this page:** 2\
**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:** [November 25, 2019, 7:02am UTC](https://discourse.julialang.org/t/jld-file-and-strings-how-to-add-new-line-to-string-array-to-existing-jld-file/31475/1 "2019-11-25T07:02:35Z")

</div>

Is posible to add new line with Float but what about Strings Array? Somebody can help ?

Floats works like below:

```nohighlight
fid = h5open("my_file.h5","w")
A = d_create(fid, "A", Float64, ((5,5),(-1,-1)), "chunk", (5,5))
A[:,:] = randn(5,5)
close(fid)

# add row
fid = h5open("my_file.h5","r+")
A = d_open(fid, "A")
set_dims!(A, (6,5)) # add new row
A[6,:] = -1.
k,l=size(A)# new size
close(fid)

```

works nice!

But…

```julia
julia> using JLD, HDF5

julia> fid = h5open("my_file.h5","w")
HDF5 data file: my_file.h5

julia> A = d_create(fid, "A", String, ((5,5),(-1,-1)), "chunk", (5,5))
ERROR: MethodError: no method matching datatype(::Type{String})
Closest candidates are:
  datatype(::String) at C:\Users\PC\.julia\packages\HDF5\Zh9on\src\HDF5.jl:1173
  datatype(::HDF5Attribute) at C:\Users\PC\.julia\packages\HDF5\Zh9on\src\HDF5.jl:1156
  datatype(::HDF5Dataset) at C:\Users\PC\.julia\packages\HDF5\Zh9on\src\HDF5.jl:1154
  ...
Stacktrace:
 [1] d_create(::HDF5File, ::String, ::Type, ::Tuple{Tuple{Int64,Int64},Tuple{Int64,Int64}}, ::String, ::Tuple{In
t64,Int64}) at C:\Users\PC\.julia\packages\HDF5\Zh9on\src\HDF5.jl:939
 [2] top-level scope at REPL[3]:1

julia> A[:,:] = string.(randn(5,5))
ERROR: UndefVarError: A not defined
Stacktrace:
 [1] top-level scope at REPL[4]:1

julia> read(fid)
Dict{String,Any} with 0 entries

julia> close(fid)

```

I must works with Array{String,2} and i nedd add some new rows Array{String,1}  
Paul

---

<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:** [November 30, 2019, 8:50am UTC](https://discourse.julialang.org/t/jld-file-and-strings-how-to-add-new-line-to-string-array-to-existing-jld-file/31475/2 "2019-11-30T08:50:46Z")

</div>

Somebody can HELP ?  
Paul
