maybe this is not your problem, but I had this problem several days ago :
when generate tasklist to csv file, and after it read this csv to array, work fine. but on one PC not, this PC have Windows 10 france version.
when debugging, i saw , that to array read only 3 columns from CSV.
Problem was with diacritics or. umlauts.
see here
Windows 10 eng. version
Image Name;PID;Session Name;Session#;Mem Usage;Status;User Name;CPU Time;Window Title
Windows 10 fra version
"Nom de l'image","PID","Nom de la session","Num‚ro de session","Utilisation m‚moire","tat","Nom d'utilisateur","Temps processeur","Titre de la fenetre"
maybe also in your csv was some special character , that cause problems. look
I have solved it with ignore first row in csv and generate own correct header for csv
PS: because here not show correct some character problematic csv attached.