How do I format a struct inside a CSV?

I’m trying to teach myself how to encapsulate structs inside a datatable row, so I made myself a silly example:

USTRUCT(BlueprintType)
struct FStructOne {
	GENERATED_USTRUCT_BODY()

		int32 someInt;
		FString someString;
};

USTRUCT(BlueprintType)
struct FStructTwo {
	GENERATED_USTRUCT_BODY()

		float someFloat;
		float someOtherFloat;
};

USTRUCT(Blueprintable)
struct FMyCustomLookupTable : public FTableRowBase {
	GENERATED_BODY()

		FStructOne one;
		FStructTwo two;
};

This part works, but I can’t figure out how to format the fields inside my actual CSV to tell the importer that it’s looking at a struct- I tried both individually placing each variable in its own column, and doing something like the following:

one
(15, testString)

Neither one works, and in both cases I get “cannot find property in column”, which I assume means that unreal can’t match my custom lookup table’s values to the values in my CSV; is there a different way I should be formatting my spreadsheet to tell Unreal that it’s looking at a struct?

It would look something along the lines of:

---,one,two
1,"((someInt=15,someString=\"testString\"))","((someFloat=123.456,someOtherFloat=456.789))"

An easy way to see for yourself would be to use the data table editor to populate a row of your data table, and then use the “Export CSV” option to generate an example CSV file in the correct format.

Ooh that does the trick perfectly; exporting an example is a great idea, thank you very much :slight_smile: