You saved me a ton of time today.
One nice addition would be a possibility to put a second row with units below row one that show the fields. I notice that many of my engineering data files have two header lines; one width the field names and the second line with the units.
Nerual, please give an example of a matrix or array that gives this error. The function takes a number of different input types (cell arrays, matrices, etc), so it is not immediately clear to me what would cause that error.
Benny, again, please give an example of the matrix or array that causes this error. As to nested structs, those are not handled by this function, because it is not recursive, and it's not clear to me how such information could be laid out nicely in a tabular worksheet (.csv).
I would give 5 stars if only I could get the  read correctly, currently your program skips them and fill in the  with the next cell-value, also if there are nested struct, it will not read it either, which will make the columns go wrong in Excel, I am a new MatLab user - is there a way to fix this problem ? Please help ASAP. Thanks, in advance
The precision is controlled by one of the numerous "num2str" arguments in the file. I did not give any specific number format strings, because it was made to be general-purpose. I'll put some thought to it, see if I can improve it. In the meantime, if you need the precision, look for the right "num2str", and pass it a format string.