Import file excel with different length
17 views (last 30 days)
Hi I would like to know if there is an easy way to import Excel files of different length. In particular, each Excel file is composed by 4 variables.
I should create an array that contains each vector of the files and put them by column.
In detail, I enclose my code.
This is the matrix that contains all the data that then groups them together for similar variables:
The problem is that each vector of array has a different length. (give error)
The goal is then separted each variable in this way:
Thanks a lot in advance and I hope someone can give me suggestions!!!!
ChrizzzlP on 7 May 2020
You could specify a range that has the length of the longest vector (xlrange), which will load in empty cells as NaN, which you could then later remove. Or load in the 4 vectors seperately from the start (also can be done by specifying the range)