Writing to File
Describes how to output a data table to a file
1. Write to file
OutputTable outputTable = new OutputTable();
SampleOutputData row = new SampleOutputData(); // Create data row
row.COL_1 = 1;
row.COL_2 = 2;
outputTable.AddRow(row); // Add data row to table
OutputManager.Instance.SetOutput(outputTable.Name, outputTable); // Register table in OutputManager
outputTable.WriteToFile(); // Write to .csv fileAppending to the last line of an existing file
outputTable.WriteToFile(path, true); // Append data to an existing fileSetting whether to add column names for the first row
Setting file name
2. Example code
Last updated