UDataTableFunctionLibrary::FillDataTableFromCSVString
#include "Kismet/DataTableFunctionLibrary.h"
Access: public
Specifiers: staticBlueprintCallable
Description
Empties DataTable and repopulates it by parsing CSVString as CSV data, optionally forcing a specific row struct for the import.
Caveats & Gotchas
- • Editor-only (#if WITH_EDITOR) — unavailable in packaged/runtime builds; call only from editor utility widgets, editor scripts, or commandlets.
- • Destroys the table's existing rows before importing; there's no merge option.
- • Passing ImportRowStruct also suppresses any interactive dialogs, making the import safe to run unattended (e.g. from a commandlet); omitting it may prompt on column mismatches.
Signature
static bool FillDataTableFromCSVString(UDataTable* DataTable, const FString& CSVString, UScriptStruct* ImportRowStruct = nullptr); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| DataTable | UDataTable* | The table to empty and repopulate. | — |
| CSVString | const FString& | CSV text to parse as the table's new contents. | — |
| ImportRowStruct | UScriptStruct* | Optional row struct to force for the import; also makes the import fully automated with no dialogs. | nullptr |
Return Type
bool Example
Import CSV text into a table C++
const FString CSV = TEXT("---,Damage,FireRate\nRifle,25,0.1\nPistol,15,0.2\n");
UDataTableFunctionLibrary::FillDataTableFromCSVString(MyDataTable, CSV, FWeaponStatsRow::StaticStruct()); See Also
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?