Issue with FString and loading from file


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 = {

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

		TArray<FString> stringArray = {};

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

		temp = stringArray[0];


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.

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

Thank you very much for assisting. It works now.