Editing Data

# Course Introduction

You can use data sets to add or modify data. In this guide, we will explore loading data by creating data and editing data, and with scripts.

# Creating Data Sets and Opening Data Editor

  1. In the context menu of Workspace - MyDesk, click Create DataSet.

  2. Double-click the created data to open Data Editor. [png](16651306854177c11e2993eae457888ac58ec6a52b3f6)




# Data Editor

   


[{"Number":"[jpg](1634541272181b5c1a55fcf3d49b19734d25913c38583)","Desription":"Column CellDefine the data name for each row, i.e. the column name.You can load the data of each row via the column name."},{"Number":"[jpg](1634541300837cb541c2f44e046a79bb1901a885aa8ac)","Desription":"CellEach set is an input text field. Enter the data value suitable for the definition of each row.The entered data values are all saved as strings."},{"Number":"[jpg](163454131465069e090278448490f965207e9a4a10348)","Desription":"Add row\/column buttonWhen you click the button, add a new row or column at the end of the row\/column."},{"Number":"[jpg](1634541326353d8628c1473944497bf376acb7a65ca45)","Desription":"Insert or delete row\/column handlerAdd a new row\/column around the row\/column selected, or delete the selected row\/column.You can see the handler by selecting the head row and head column."},{"Number":"[jpg](1634541338689678f574f21e54a6ca533737924124d7e)","Desription":"Import data from the webYou can import the data of GoogleSpreadSheet.If you write data in GoogleSpreadSheet and put the URL of the data in the pop-up window,it overwrites data in GoogleSpreadSheet over currently open data. However, URLs in GoogleSpreadSheet can only use URLs posted on the web. [png](16577012857253f3f35d4a11f4cfbb9faaa60264c18b9)"},{"Number":"[jpg](163454135201207284554a25b498380fff224cd767f6b)","Desription":"Import CSV FilesYou can import CSV files saved to the computer and overwrite the current data.Only CSV files saved as utf-8 can be properly imported.Export CSV FilesExport Maker's DataSet as a CSV file to save to the computer."}]

  
# Load the Composed Data Script 

  1. First, write the contents of the image below into the NewDataSet you created above. [png](16596783003508b1add63e564405d9f00a099a8496934)   

  2. Save the data and add a new script component called DataSet. [png](16878457449028bebb7ed9b9141288f93dd176baca7c5)   

  3. Open the DataSet component and add the `OnBeginPlay()` function. [png](16354715733367404d00c99aa45de86f5cc5cdfe101ec)   

  4. Write as follows. 
         
         @Component
         script DataCellRetriever extends Component
         @ExecSpace("ServerOnly")
         method void OnBeginPlay()
         --Retrieve the data table with the name of the data created above.
         local dataSet = _DataService:GetTable("NewDataSet")    
         -- Enter the row and column number of the cell data that you are trying to retrieve as parameters.
         local cellValue = dataSet:GetCell(3,2)               
         --Output the cell value on the console window.
         log("cellValue : "..tostring(cellValue))             
         end
         end
         



    
    
          
    
    5. Click **Add Component** in the context menu of **Hierarchy - map01**.
          
    
    6. Search for **DataSet** and add the **DataSet** component.
        [png](1637219296068e486bb5b29b4418b9ef31c1647ad3323)
    
        >**Learn More**
        >**_DataService:GetTable(string name)**
        > Function of returning the data table as the name of the data.
        > Pass the data name as variable.
        >   
    
        > **UserDataSet:GetCell(int row_1based, int col_based)**
        > Return the value of a particular cell from data as string type.
        > Enter column and row number where the cell is located as variable.
        > Row and column start from 1.
          
            
    7. Press Play and check the Console window.
    [png](165967905703060d30eec2560433d9a4922fefc9ed0db)