RealDocs

UDataTableFunctionLibrary::FillDataTableFromCSVFile

function Engine Blueprint Since unknown
#include "Kismet/DataTableFunctionLibrary.h"
Access: public Specifiers: staticBlueprintCallable

Description

Empties DataTable and repopulates it by reading and parsing the CSV file at CSVFilePath.

Caveats & Gotchas

  • Editor-only (#if WITH_EDITOR); not available in packaged builds.
  • CSVFilePath is a normal file-system path, not a content-browser asset path — point it at an actual .csv file on disk (absolute or project-relative).
  • Check the Output Log for import errors; a malformed CSV can return false without raising a Blueprint exception.

Signature

static bool FillDataTableFromCSVFile(UDataTable* DataTable, const FString& CSVFilePath, UScriptStruct* ImportRowStruct = nullptr);

Parameters

Name Type Description Default
DataTable UDataTable* The table to empty and repopulate.
CSVFilePath const FString& File-system path of the CSV file to read.
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 a CSV file into a table C++
UDataTableFunctionLibrary::FillDataTableFromCSVFile(MyDataTable, TEXT("C:/Data/WeaponStats.csv"), FWeaponStatsRow::StaticStruct());

Version History

Introduced in: unknown

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.