I have hundreds of XLS files that need to be aggregated, but I find that each file has more or less missing values or error messages. Is there any way to quickly clean up these missing values or error messages? Because I still don't know how to clean up a lot of data, so the following code only extract the data in different files.
(* Get a list of files *)
dir = "D:\\Data";
fileList = FileNames["*", dir];
For[i = 1, i = Length[fileList], i++,
If[i == 1,
rawdata = Import[fileList[[i]], {"XLS", "Data"}][[1]]; (*i=1 olny *)
,
{
tempData = Rest@Import[fileList[[i]], {"XLS", "Data"}][[1]]; (*i != 1*)
rawdata = AppendTo[rawdata, tempData];
}
]
]
Attachments: