Index: /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/DataGridContentView.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/DataGridContentView.cs	(revision 13513)
+++ /trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/DataGridContentView.cs	(revision 13514)
@@ -31,5 +31,5 @@
 namespace HeuristicLab.DataPreprocessing.Views {
   [View("Data Grid Content View")]
-  [Content(typeof(IDataGridContent), true)]
+  [Content(typeof(DataGridContent), true)]
   public partial class DataGridContentView : StringConvertibleMatrixView {
 
@@ -42,6 +42,6 @@
     private Tuple<int, int> currentCell;
 
-    public new IDataGridContent Content {
-      get { return (IDataGridContent)base.Content; }
+    public new DataGridContent Content {
+      get { return (DataGridContent)base.Content; }
       set { base.Content = value; }
     }
@@ -145,4 +145,5 @@
     protected override void PasteValuesToDataGridView() {
       string[,] values = SplitClipboardString(Clipboard.GetText());
+      if (values.Length == 0) return;
       int rowIndex = 0;
       int columnIndex = 0;
@@ -151,13 +152,33 @@
         columnIndex = dataGridView.CurrentCell.ColumnIndex;
       }
-      if (Content.Rows < values.GetLength(1) + rowIndex) Content.Rows = values.GetLength(1) + rowIndex;
-      if (Content.Columns < values.GetLength(0) + columnIndex) Content.Columns = values.GetLength(0) + columnIndex;
+
+      bool containsHeader = false;
+      var firstRow = Enumerable.Range(0, values.GetLength(0)).Select(col => values[col, 0]).ToList();
+      if ((Content.Selection.Values.Sum(s => s.Count) == Content.Rows * Content.Columns)
+          || (rowIndex == 0 && columnIndex == 0 && Content.Rows <= values.GetLength(1) && Content.Columns <= values.GetLength(0))) {
+        // All is selected -or- top left selected and everything will be replaced
+        double temp;
+        containsHeader = !firstRow.All(string.IsNullOrEmpty) && firstRow.Any(r => !double.TryParse(r, out temp));
+        if (containsHeader)
+          rowIndex = columnIndex = 0;
+      }
+
+      int newRows = values.GetLength(1) + rowIndex - (containsHeader ? 1 : 0);
+      int newColumns = values.GetLength(0) + columnIndex;
+      if (Content.Rows < newRows) Content.Rows = newRows;
+      if (Content.Columns < newColumns) Content.Columns = newColumns;
 
       ReplaceTransaction(() => {
         Content.PreProcessingData.InTransaction(() => {
-          for (int row = 0; row < values.GetLength(1); row++) {
+          for (int row = containsHeader ? 1 : 0; row < values.GetLength(1); row++) {
             for (int col = 0; col < values.GetLength(0); col++) {
-              Content.SetValue(values[col, row], row + rowIndex, col + columnIndex);
+              Content.SetValue(values[col, row], row + rowIndex - (containsHeader ? 1 : 0), col + columnIndex);
             }
+          }
+          if (containsHeader) {
+            for (int i = 0; i < firstRow.Count; i++)
+              if (string.IsNullOrWhiteSpace(firstRow[i]))
+                firstRow[i] = string.Format("<{0}>", i);
+            Content.PreProcessingData.RenameColumns(firstRow);
           }
         });
Index: /trunk/sources/HeuristicLab.DataPreprocessing/3.4/Content/DataGridContent.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing/3.4/Content/DataGridContent.cs	(revision 13513)
+++ /trunk/sources/HeuristicLab.DataPreprocessing/3.4/Content/DataGridContent.cs	(revision 13514)
@@ -26,9 +26,10 @@
 using HeuristicLab.Common;
 using HeuristicLab.Core;
+using HeuristicLab.Data;
 
 namespace HeuristicLab.DataPreprocessing {
 
   [Item("DataGrid", "Represents a data grid.")]
-  public class DataGridContent : Item, IViewShortcut, IDataGridContent {
+  public class DataGridContent : Item, IStringConvertibleMatrix, IViewShortcut {
 
     public ITransactionalPreprocessingData PreProcessingData { get; private set; }
Index: unk/sources/HeuristicLab.DataPreprocessing/3.4/Content/IDataGridContent.cs
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing/3.4/Content/IDataGridContent.cs	(revision 13513)
+++ 	(revision )
@@ -1,39 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System.Collections.Generic;
-using HeuristicLab.Data;
-
-namespace HeuristicLab.DataPreprocessing {
-  public interface IDataGridContent : IStringConvertibleMatrix {
-    ITransactionalPreprocessingData PreProcessingData { get; }
-    ManipulationLogic ManipulationLogic { get; }
-    FilterLogic FilterLogic { get; }
-
-    IDictionary<int, IList<int>> Selection { get; set; }
-
-    void DeleteRows(IEnumerable<int> rows);
-    void DeleteColumn(int column);
-    bool Validate(string value, out string errorMessage, int columnIndex);
-
-    event DataPreprocessingChangedEventHandler Changed;
-  }
-}
Index: /trunk/sources/HeuristicLab.DataPreprocessing/3.4/HeuristicLab.DataPreprocessing-3.4.csproj
===================================================================
--- /trunk/sources/HeuristicLab.DataPreprocessing/3.4/HeuristicLab.DataPreprocessing-3.4.csproj	(revision 13513)
+++ /trunk/sources/HeuristicLab.DataPreprocessing/3.4/HeuristicLab.DataPreprocessing-3.4.csproj	(revision 13514)
@@ -108,5 +108,4 @@
     <Compile Include="Logic\SearchLogic.cs" />
     <Compile Include="Logic\StatisticsLogic.cs" />
-    <Compile Include="Content\IDataGridContent.cs" />
     <Compile Include="Data\ITransactionalPreprocessingData.cs" />
     <Compile Include="Plugin.cs" />
