Issue with FString and loading from file

Whoops…

On the previous image it shows that the stringArray is empty, which is weird because you are printing it. As an experience try copying a few lines from the file you are parsing and add to a new FString and use parseIntoArray in that, just to see if the problem is in that function or in the FFileHelper::LoadANSITextFileToStrings.

This works:

	TArray<FString> fromFile = {
		"FirstName,MiddleName,LastName,1,1,2018",
		"Some,One,Else,1,2,2018",
		"Third,Person,Example,1,3,2018" 
	};

	for (int i = 0; i < fromFile.Num(); i++) {
		temp = "";
		FString aString = fromFile[i];

		TArray<FString> stringArray = {};

		aString.ParseIntoArray(stringArray, TEXT(","), false);

		temp = stringArray[0];

		data.Add(temp);
	}

So its an issue with LoadANSITextFileToStrings?

Can you send me your csv file? I imported your original code and called it in my begin play and it’s working fine.

I think the problem is that you have an empty line after line 10. Delete that and it should work.

*facepalm…
I cannot believe I forgot to handle the last line - “empty row” case…

Thank you very much for assisting. It works now.