How to export a multidimensional array in which each element is also an array?

I have a {15,5,2} dimensional array and each element is itself a {14,16} dimensional array. When I export/import my file as an excel file I get a {15,,5,2} dimensional array but with {} dimension for each element. Somehow it doesn't recognize each element as a matrix. Does anybody know how I can solve this problem?

Thank you.

I noticed I cannot use excel for higher dimensions, but using HDF5, I still get error.

• What Mathematica version ? – andre314 Jun 10 '19 at 17:30
• 11.2 but it was my bad using Excel format I guess. Do you know any other formats work properly? I examined .dat also, but changes the dimensionality – Delaram Nematollahi Jun 10 '19 at 17:47
• Do you need to open these files in any program other than Mathematica? If you don't, then I often use ".mat" files. They import and export really quickly and are good at keeping arrays the same. The one caveat is that when you import a matrix, you have to go matrix[[1]] (or whatever your matrix name is) as the ".mat" format adds an extra {} around the overall array but doesn't mess with the components. – MassDefect Jun 10 '19 at 17:55
• IMHO, hdf5 is the way to go. Much more efficient than .mat because it supports higher multidimensional tensors natively. – Henrik Schumacher Jun 10 '19 at 18:21
• Thank you so much, I keep getting this error: Export::errelem: The Export element Datasets contains a malformed data structure and could not be exported to HDF5 format. – Delaram Nematollahi Jun 10 '19 at 19:23