I have 15 datasets in a .xlsx/.format that total to 30 columns of data, and would like to import them all at once. The data are ordered every two columns (columns 1 and 2 are dataset1, columns 3 and 4 are dataset2, etc...)
My first thought was to use Table to import the data into an indexed variable, like so:
data = Table[Import["filepath.xlsx"][[1, All, {i, i + 1}]], {i, 1, 30, 2}]
While the data are successfully imported, I come across an issue where all of columns that are shorter then the longest column are filled up to the length of the longest column. For example, the first column, which is shorter, has extra values that look like {x(1),y(1)},{x(end),y(end)},{,},{,},{,},...
I can still plot the data just fine, but I encounter errors down the line and would like to find a more elegant way to work around this issue that doesn't involve importing 15 different excel sheets.
Select
orCases
to strip the blank rows after import. $\endgroup$