You need to combine the edge list with a node list. This node list needs to have an ID column whose values match the values use for Source ID and Target ID in the edge list. Additionally, the node list needs a Type column with the appropriate A,B,C,D types. After importing your spreadsheet, go to "Edit" -> "Properties Mapper" and create a node configuration that sets the node's fill colour depending on the node's type. Detailed information on yEd's properties mapper is available in the yEd manual.