Index: stable/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/DataAnalysisImportTypeDialog.cs
===================================================================
--- stable/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/DataAnalysisImportTypeDialog.cs	(revision 15161)
+++ stable/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/DataAnalysisImportTypeDialog.cs	(revision 15170)
@@ -158,5 +158,5 @@
       }
       catch (Exception ex) {
-        if (ex is IOException || ex is InvalidOperationException || ex is ArgumentException || ex is TableFileParser.DataFormatException) {
+        if (ex is IOException || ex is InvalidOperationException || ex is ArgumentException) {
           OkButton.Enabled = false;
           ErrorTextBox.Text = ex.Message;
Index: stable/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/RegressionInstanceProviderView.cs
===================================================================
--- stable/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/RegressionInstanceProviderView.cs	(revision 15161)
+++ stable/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/RegressionInstanceProviderView.cs	(revision 15170)
@@ -52,17 +52,22 @@
 
           try {
-            var progress = mainForm.AddOperationProgressToContent(activeView.Content, "Loading problem instance.");
+            var progress = mainForm.AddOperationProgressToContent(activeView.Content,
+              "Loading problem instance.");
 
-            Content.ProgressChanged += (o, args) => { progress.ProgressValue = args.ProgressPercentage / 100.0; };
+            Content.ProgressChanged +=
+              (o, args) => { progress.ProgressValue = args.ProgressPercentage / 100.0; };
 
-            instance = Content.ImportData(importTypeDialog.Path, importTypeDialog.ImportType, importTypeDialog.CSVFormat);
-          } catch (IOException ex) {
+            instance = Content.ImportData(importTypeDialog.Path, importTypeDialog.ImportType,
+              importTypeDialog.CSVFormat);
+          } catch (Exception ex) {
             ErrorWhileParsing(ex);
+            return;
+          } finally {
             mainForm.RemoveOperationProgressFromContent(activeView.Content);
-            return;
           }
+
           try {
             GenericConsumer.Load(instance);
-          } catch (IOException ex) {
+          } catch (Exception ex) {
             ErrorWhileLoading(ex, importTypeDialog.Path);
           } finally {
Index: stable/HeuristicLab.Problems.Instances.DataAnalysis/3.3/TableFileParser.cs
===================================================================
--- stable/HeuristicLab.Problems.Instances.DataAnalysis/3.3/TableFileParser.cs	(revision 15161)
+++ stable/HeuristicLab.Problems.Instances.DataAnalysis/3.3/TableFileParser.cs	(revision 15170)
@@ -28,5 +28,4 @@
 using System.IO;
 using System.Linq;
-using System.Runtime.Serialization;
 using System.Text;
 
@@ -198,22 +197,14 @@
     /// <param name="columnNamesInFirstLine"></param>
     public void Parse(Stream stream, NumberFormatInfo numberFormat, DateTimeFormatInfo dateTimeFormatInfo, char separator, bool columnNamesInFirstLine, int lineLimit = -1) {
-      using (StreamReader reader = new StreamReader(stream, Encoding)) {
+      if (lineLimit > 0) estimatedNumberOfLines = lineLimit;
+
+      using (var reader = new StreamReader(stream)) {
         tokenizer = new Tokenizer(reader, numberFormat, dateTimeFormatInfo, separator);
+        var strValues = new List<List<string>>();
         values = new List<IList>();
-        if (lineLimit > 0) estimatedNumberOfLines = lineLimit;
-
-        if (columnNamesInFirstLine) {
-          ParseVariableNames();
-          if (!tokenizer.HasNext())
-            Error(
-              "Couldn't parse data values. Probably because of incorrect number format (the parser expects english number format with a '.' as decimal separator).",
-              "", tokenizer.CurrentLineNumber);
-        }
-
-
-        // read values... start in first row 
+        Prepare(columnNamesInFirstLine, strValues);
+
         int nLinesParsed = 0;
         int colIdx = 0;
-        int numValuesInFirstRow = columnNamesInFirstLine ? variableNames.Count : -1; // number of variables or inizialize based on first row of values (-1)
         while (tokenizer.HasNext() && (lineLimit < 0 || nLinesParsed < lineLimit)) {
           if (tokenizer.PeekType() == TokenTypeEnum.NewLine) {
@@ -221,10 +212,10 @@
 
             // all rows have to have the same number of values
-            // the first row defines how many samples are needed
-            if (numValuesInFirstRow < 0) numValuesInFirstRow = values.Count; // set to number of colums in the first row
-            else if (colIdx > 0 && numValuesInFirstRow != colIdx) { // read at least one value in the row (support for skipping empty lines)
-              Error("The first row of the dataset has " + numValuesInFirstRow + " columns." + Environment.NewLine +
+            // the first row defines how many elements are needed
+            if (colIdx > 0 && values.Count != colIdx) {
+              // read at least one value in the row (support for skipping empty lines)
+              Error("The first row of the dataset has " + values.Count + " columns." + Environment.NewLine +
                     "Line " + tokenizer.CurrentLineNumber + " has " + colIdx + " columns.", "",
-                    tokenizer.CurrentLineNumber);
+                tokenizer.CurrentLineNumber);
             }
             OnReport(tokenizer.BytesRead);
@@ -234,27 +225,32 @@
           } else {
             // read one value
-            TokenTypeEnum type; string strVal; double dblVal; DateTime dateTimeVal;
+            TokenTypeEnum type;
+            string strVal;
+            double dblVal;
+            DateTime dateTimeVal;
             tokenizer.Next(out type, out strVal, out dblVal, out dateTimeVal);
 
-            // initialize columns on the first row (fixing data types as presented in the first row...)
-            if (nLinesParsed == 0) {
-              values.Add(CreateList(type, estimatedNumberOfLines));
-            } else if (colIdx == values.Count) {
-              Error("The first row of the dataset has " + numValuesInFirstRow + " columns." + Environment.NewLine +
+            if (colIdx == values.Count) {
+              Error("The first row of the dataset has " + values.Count + " columns." + Environment.NewLine +
                     "Line " + tokenizer.CurrentLineNumber + " has more columns.", "",
                 tokenizer.CurrentLineNumber);
             }
             if (!IsColumnTypeCompatible(values[colIdx], type)) {
-              values[colIdx] = ConvertToStringColumn(values[colIdx]);
+              values[colIdx] = strValues[colIdx];
             }
+
             // add the value to the column
-            AddValue(type, values[colIdx++], strVal, dblVal, dateTimeVal);
+            AddValue(type, values[colIdx], strVal, dblVal, dateTimeVal);
+            if (!(values[colIdx] is List<string>)) { // optimization: don't store the string values in another list if the column is list<string>
+              strValues[colIdx].Add(strVal);
+            }
+            colIdx++;
           }
         }
-
-        if (!values.Any() || values.First().Count == 0)
-          Error("Couldn't parse data values. Probably because of incorrect number format " +
-                "(the parser expects english number format with a '.' as decimal separator).", "", tokenizer.CurrentLineNumber);
-      }
+      }
+
+      if (!values.Any() || values.First().Count == 0)
+        Error("Couldn't parse data values. Probably because of incorrect number format " +
+              "(the parser expects english number format with a '.' as decimal separator).", "", tokenizer.CurrentLineNumber);
 
       this.rows = values.First().Count;
@@ -277,4 +273,35 @@
       // for large files we created a lot of memory pressure, cannot hurt to run GC.Collect here (TableFileParser is called seldomly on user interaction)
       GC.Collect(2, GCCollectionMode.Forced);
+    }
+
+    private void Prepare(bool columnNamesInFirstLine, List<List<string>> strValues) {
+      if (columnNamesInFirstLine) {
+        ParseVariableNames();
+        if (!tokenizer.HasNext())
+          Error(
+            "Couldn't parse data values. Probably because of incorrect number format (the parser expects english number format with a '.' as decimal separator).",
+            "", tokenizer.CurrentLineNumber);
+      }
+      // read first line to determine types and allocate specific lists
+      // read values... start in first row 
+      int colIdx = 0;
+      while (tokenizer.PeekType() != TokenTypeEnum.NewLine) {
+        // read one value
+        TokenTypeEnum type; string strVal; double dblVal; DateTime dateTimeVal;
+        tokenizer.Next(out type, out strVal, out dblVal, out dateTimeVal);
+
+        // initialize column
+        values.Add(CreateList(type, estimatedNumberOfLines));
+        if (type == TokenTypeEnum.String)
+          strValues.Add(new List<string>(0)); // optimization: don't store the string values in another list if the column is list<string>
+        else
+          strValues.Add(new List<string>(estimatedNumberOfLines));
+
+        AddValue(type, values[colIdx], strVal, dblVal, dateTimeVal);
+        if (type != TokenTypeEnum.String)
+          strValues[colIdx].Add(strVal);
+        colIdx++;
+      }
+      tokenizer.Skip(); // skip newline
     }
 
@@ -530,5 +557,7 @@
                 type = TokenTypeEnum.Double;
                 doubleVals[i] = doubleVal;
-              } else if (DateTime.TryParse(tok, dateTimeFormatInfo, DateTimeStyles.None, out dateTimeValue)) {
+              } else if (DateTime.TryParse(tok, dateTimeFormatInfo, DateTimeStyles.NoCurrentDateDefault, out dateTimeValue)
+                && (dateTimeValue.Year > 1 || dateTimeValue.Month > 1 || dateTimeValue.Day > 1)// if no date is given it is returned as 1.1.0001 -> don't allow this
+                ) {
                 type = TokenTypeEnum.DateTime;
                 dateTimeVals[i] = dateTimeValue;
@@ -606,26 +635,7 @@
 
     private void Error(string message, string token, int lineNumber) {
-      throw new DataFormatException("Error while parsing.\n" + message, token, lineNumber);
+      throw new IOException(string.Format("Error while parsing. {0} (token: {1} lineNumber: {2}).", message, token, lineNumber));
     }
     #endregion
-
-    [Serializable]
-    public class DataFormatException : Exception {
-      private int line;
-      public int Line {
-        get { return line; }
-      }
-      private string token;
-      public string Token {
-        get { return token; }
-      }
-      public DataFormatException(string message, string token, int line)
-        : base(message + "\nToken: " + token + " (line: " + line + ")") {
-        this.token = token;
-        this.line = line;
-      }
-
-      public DataFormatException(SerializationInfo info, StreamingContext context) : base(info, context) { }
-    }
   }
 }
Index: stable/HeuristicLab.Tests/HeuristicLab.Problems.Instances.DataAnalysis-3.3/TableFileParserTest.cs
===================================================================
--- stable/HeuristicLab.Tests/HeuristicLab.Problems.Instances.DataAnalysis-3.3/TableFileParserTest.cs	(revision 15161)
+++ stable/HeuristicLab.Tests/HeuristicLab.Problems.Instances.DataAnalysis-3.3/TableFileParserTest.cs	(revision 15170)
@@ -24,4 +24,5 @@
 using System.Globalization;
 using System.IO;
+using System.Text;
 using Microsoft.VisualStudio.TestTools.UnitTesting;
 
@@ -47,5 +48,6 @@
         Assert.AreEqual(4, parser.Columns);
         Assert.AreEqual(parser.Values[3][0], 3.14);
-      } finally {
+      }
+      finally {
         File.Delete(tempFileName);
       }
@@ -71,5 +73,6 @@
         Assert.AreEqual(4, parser.Columns);
         Assert.AreEqual(parser.Values[3][0], 3.14);
-      } finally {
+      }
+      finally {
         File.Delete(tempFileName);
       }
@@ -94,5 +97,6 @@
         Assert.AreEqual(4, parser.Columns);
         Assert.AreEqual(parser.Values[3][0], 3.14);
-      } finally {
+      }
+      finally {
         File.Delete(tempFileName);
       }
@@ -118,5 +122,6 @@
         Assert.AreEqual(4, parser.Columns);
         Assert.AreEqual(parser.Values[3][0], 3.14);
-      } finally {
+      }
+      finally {
         File.Delete(tempFileName);
       }
@@ -141,5 +146,6 @@
         Assert.AreEqual(4, parser.Columns);
         Assert.AreEqual((double)parser.Values[3][0], 3);
-      } finally {
+      }
+      finally {
         File.Delete(tempFileName);
       }
@@ -165,5 +171,6 @@
         Assert.AreEqual(4, parser.Columns);
         Assert.AreEqual((double)parser.Values[3][0], 3);
-      } finally {
+      }
+      finally {
         File.Delete(tempFileName);
       }
@@ -188,5 +195,6 @@
         Assert.AreEqual(4, parser.Columns);
         Assert.AreEqual((double)parser.Values[3][0], 3);
-      } finally {
+      }
+      finally {
         File.Delete(tempFileName);
       }
@@ -211,5 +219,6 @@
         Assert.AreEqual(4, parser.Columns);
         Assert.AreEqual((double)parser.Values[3][0], 3);
-      } finally {
+      }
+      finally {
         File.Delete(tempFileName);
       }
@@ -235,5 +244,6 @@
         Assert.AreEqual(4, parser.Columns);
         Assert.AreEqual((double)parser.Values[3][0], 3);
-      } finally {
+      }
+      finally {
         File.Delete(tempFileName);
       }
@@ -259,5 +269,6 @@
         Assert.AreEqual(4, parser.Columns);
         Assert.AreEqual((double)parser.Values[3][0], 3);
-      } finally {
+      }
+      finally {
         File.Delete(tempFileName);
       }
@@ -283,5 +294,6 @@
         Assert.AreEqual(4, parser.Columns);
         Assert.AreEqual((double)parser.Values[3][0], 3.14);
-      } finally {
+      }
+      finally {
         File.Delete(tempFileName);
       }
@@ -307,5 +319,6 @@
         Assert.AreEqual(4, parser.Columns);
         Assert.AreEqual((double)parser.Values[3][0], 3.14);
-      } finally {
+      }
+      finally {
         File.Delete(tempFileName);
       }
@@ -330,5 +343,6 @@
         Assert.AreEqual(4, parser.Columns);
         Assert.AreEqual((double)parser.Values[3][0], 3.14);
-      } finally {
+      }
+      finally {
         File.Delete(tempFileName);
       }
@@ -354,5 +368,6 @@
         Assert.AreEqual(4, parser.Columns);
         Assert.AreEqual((double)parser.Values[3][0], 3.14);
-      } finally {
+      }
+      finally {
         File.Delete(tempFileName);
       }
@@ -377,5 +392,6 @@
         Assert.AreEqual(4, parser.Columns);
         Assert.AreEqual((double)parser.Values[3][0], 3);
-      } finally {
+      }
+      finally {
         File.Delete(tempFileName);
       }
@@ -401,5 +417,6 @@
         Assert.AreEqual(4, parser.Columns);
         Assert.AreEqual((double)parser.Values[3][0], 3);
-      } finally {
+      }
+      finally {
         File.Delete(tempFileName);
       }
@@ -424,5 +441,6 @@
         Assert.AreEqual(4, parser.Rows);
         Assert.AreEqual(4, parser.Columns);
-      } finally {
+      }
+      finally {
         File.Delete(tempFileName);
       }
@@ -447,5 +465,6 @@
         Assert.AreEqual(4, parser.Columns);
         Assert.AreEqual((double)parser.Values[3][0], 3.14);
-      } finally {
+      }
+      finally {
         File.Delete(tempFileName);
       }
@@ -471,5 +490,6 @@
         Assert.AreEqual(4, parser.Columns);
         Assert.AreEqual((double)parser.Values[3][0], 3.14);
-      } finally {
+      }
+      finally {
         File.Delete(tempFileName);
       }
@@ -494,5 +514,6 @@
         Assert.AreEqual(4, parser.Columns);
         Assert.AreEqual((double)parser.Values[3][0], 3.14);
-      } finally {
+      }
+      finally {
         File.Delete(tempFileName);
       }
@@ -518,5 +539,6 @@
         Assert.AreEqual(4, parser.Columns);
         Assert.AreEqual((double)parser.Values[3][0], 3.14);
-      } finally {
+      }
+      finally {
         File.Delete(tempFileName);
       }
@@ -539,5 +561,6 @@
         Assert.AreEqual(3, parser.Rows);
         Assert.AreEqual(4507, parser.Columns);
-      } finally {
+      }
+      finally {
         File.Delete(tempFileName);
       }
@@ -562,5 +585,6 @@
         Assert.AreEqual(4, parser.Columns);
         Assert.AreEqual((double)parser.Values[3][0], 3);
-      } finally {
+      }
+      finally {
         File.Delete(tempFileName);
       }
@@ -586,5 +610,6 @@
         Assert.AreEqual(4, parser.Columns);
         Assert.AreEqual((double)parser.Values[3][0], 3);
-      } finally {
+      }
+      finally {
         File.Delete(tempFileName);
       }
@@ -627,5 +652,6 @@
         Assert.IsTrue(double.IsPositiveInfinity((double)parser.Values[1][3])); // NOTE: in DE-DE NumberFormat just "unendlich" is not allowed (compare with InvariantCulture)
         Assert.IsTrue(double.IsNegativeInfinity((double)parser.Values[1][4]));
-      } finally {
+      }
+      finally {
         File.Delete(tempFileName);
       }
@@ -664,6 +690,241 @@
         Assert.IsTrue(double.IsPositiveInfinity((double)parser.Values[1][3])); // NOTE: in InvariantCulture +Infinity is not allowed (compare with DE-DE)
         Assert.IsTrue(double.IsNegativeInfinity((double)parser.Values[1][4]));
-      } finally {
-        File.Delete(tempFileName);
+      }
+      finally {
+        File.Delete(tempFileName);
+      }
+    }
+
+
+    [TestMethod]
+    [TestCategory("Problems.Instances")]
+    [TestProperty("Time", "short")]
+    public void ParseWithTypeConversion() {
+      // the parser tries to determine the column type (double, datetime, string) by looking at the values in the first few rows
+      // if the values are of a different type then the type of the column is converted
+      {
+        // case 1 
+        // default for values is double and therefore a column with all missing values should be List<double> and contain NaN
+        var tmpFileName = Path.GetTempFileName();
+        WriteToFile(tmpFileName,
+          @"stringCol,note
+,missing val
+3.14,double
+");
+
+        TableFileParser parser = new TableFileParser();
+        try {
+          parser.Parse(tmpFileName,
+            CultureInfo.InvariantCulture.NumberFormat,
+            CultureInfo.InvariantCulture.DateTimeFormat,
+            separator: ',', columnNamesInFirstLine: true);
+          Assert.IsTrue(parser.Values[0] is List<double>);
+          Assert.AreEqual(double.NaN, parser.Values[0][0]);
+          Assert.AreEqual(3.14, parser.Values[0][1]);
+        }
+        finally {
+          File.Delete(tmpFileName);
+        }
+
+      }
+
+      {
+        // case 2
+        // 'The first missing values are replaced with double.NaN while the last ones with string.Empty.'
+
+        var tmpFileName = Path.GetTempFileName();
+        WriteToFile(tmpFileName,
+          @"stringCol,note
+,missing val
+3.14,
+,missing val
+str,a string --> column is converted to List<string>
+,missing val
+");
+
+        TableFileParser parser = new TableFileParser();
+        try {
+          parser.Parse(tmpFileName,
+            CultureInfo.InvariantCulture.NumberFormat,
+            CultureInfo.InvariantCulture.DateTimeFormat,
+            separator: ',', columnNamesInFirstLine: true);
+          Assert.IsTrue(parser.Values[0] is List<string>);
+          Assert.AreEqual(string.Empty, parser.Values[0][0]);
+          Assert.AreEqual("3.14", parser.Values[0][1]);
+          Assert.AreEqual(string.Empty, parser.Values[0][2]);
+          Assert.AreEqual("str", parser.Values[0][3]);
+          Assert.AreEqual(string.Empty, parser.Values[0][4]);
+        }
+        finally {
+          File.Delete(tmpFileName);
+        }
+      }
+
+      {
+        // case 3
+        // DateTime conversion to strings
+        var tmpFileName = Path.GetTempFileName();
+        WriteToFile(tmpFileName,
+          @"stringCol,note
+,missing val
+3.1.2016,
+,missing val
+str,a string --> column is converted to List<string>
+,missing val
+");
+
+        TableFileParser parser = new TableFileParser();
+        try {
+          parser.Parse(tmpFileName,
+            CultureInfo.InvariantCulture.NumberFormat,
+            CultureInfo.InvariantCulture.DateTimeFormat,
+            separator: ',', columnNamesInFirstLine: true);
+          Assert.IsTrue(parser.Values[0] is List<string>);
+          Assert.AreEqual(string.Empty, parser.Values[0][0]);
+          Assert.AreEqual("3.1.2016", parser.Values[0][1]);
+          Assert.AreEqual(string.Empty, parser.Values[0][2]);
+          Assert.AreEqual("str", parser.Values[0][3]);
+          Assert.AreEqual(string.Empty, parser.Values[0][4]);
+        }
+        finally {
+          File.Delete(tmpFileName);
+        }
+      }
+    }
+
+    [TestMethod]
+    [TestCategory("Problems.Instances")]
+    [TestProperty("Time", "short")]
+    public void ParseDateTime() {
+      {
+        // case 1 dates and datetimes should be parsed as datetime column
+        var tmpFileName = Path.GetTempFileName();
+        WriteToFile(tmpFileName,
+          @"stringCol,note
+19.6.2016,date
+19.6.2016 8:15,datetime 
+");
+
+        TableFileParser parser = new TableFileParser();
+        try {
+          parser.Parse(tmpFileName,
+            CultureInfo.GetCultureInfo("de-de").NumberFormat,
+            CultureInfo.GetCultureInfo("de-de").DateTimeFormat,
+            separator: ',', columnNamesInFirstLine: true);
+          Assert.IsTrue(parser.Values[0] is List<DateTime>);
+          Assert.AreEqual(new DateTime(2016, 6, 19), parser.Values[0][0]);
+          Assert.AreEqual(new DateTime(2016, 6, 19, 8, 15, 0), parser.Values[0][1]);
+
+          WriteToFile(tmpFileName,
+            @"stringCol,note
+2016/6/19,date
+2016/6/19 8:15,datetime 
+");
+
+          parser.Parse(tmpFileName,
+            CultureInfo.InvariantCulture.NumberFormat,
+            CultureInfo.InvariantCulture.DateTimeFormat,
+            separator: ',', columnNamesInFirstLine: true);
+          Assert.IsTrue(parser.Values[0] is List<DateTime>);
+          Assert.AreEqual(new DateTime(2016, 6, 19), parser.Values[0][0]);
+          Assert.AreEqual(new DateTime(2016, 6, 19, 8, 15, 0), parser.Values[0][1]);
+        }
+
+        finally {
+          File.Delete(tmpFileName);
+        }
+      }
+
+      {
+        // case 2 never parse time values as datetimes
+        var tmpFileName = Path.GetTempFileName();
+        WriteToFile(tmpFileName,
+          @"stringCol,note
+8:15,time value
+9:40,time value
+");
+
+        TableFileParser parser = new TableFileParser();
+        try {
+          parser.Parse(tmpFileName,
+            CultureInfo.InvariantCulture.NumberFormat,
+            CultureInfo.InvariantCulture.DateTimeFormat,
+            separator: ',', columnNamesInFirstLine: true);
+          Assert.IsTrue(parser.Values[0] is List<string>); // time values should be parsed as strings
+          Assert.AreEqual("8:15", parser.Values[0][0]);
+          Assert.AreEqual("9:40", parser.Values[0][1]);
+        }
+        finally {
+          File.Delete(tmpFileName);
+        }
+      }
+    }
+
+
+
+    [TestMethod]
+    [TestCategory("Problems.Instances")]
+    [TestProperty("Time", "short")]
+    public void CheckTypeConversionAndLongFiles() {
+      {
+        // case 1 incorrect input after 500 rows should lead to exceptions
+        var tmpFileName = Path.GetTempFileName();
+        // create input data
+        var sb = new StringBuilder();
+        sb.AppendLine("col1,col2");
+        for (int r = 0; r < 2000; r++) {
+          sb.AppendLine("3.15, 3.15");
+        }
+        // add a row with only one input value
+        sb.AppendLine("3.15");
+
+        WriteToFile(tmpFileName, sb.ToString());
+
+        TableFileParser parser = new TableFileParser();
+        try {
+          parser.Parse(tmpFileName,
+            CultureInfo.InvariantCulture.NumberFormat,
+            CultureInfo.InvariantCulture.DateTimeFormat,
+            separator: ',', columnNamesInFirstLine: true);
+          // Parse should fail with an exception
+          Assert.Fail("expected exception TableFileParser.DataFormatException");
+        }
+        catch (IOException) {
+          // ignore the expected exception
+        }
+
+        finally {
+          File.Delete(tmpFileName);
+        }
+      }
+      {
+        // case 2
+        var tmpFileName = Path.GetTempFileName();
+        // create input data
+        var sb = new StringBuilder();
+        sb.AppendLine("doubleCol,stringCol");
+        for (int r = 0; r < 2000; r++) {
+          sb.AppendLine("3.15, 3.15");
+        }
+        // add a row with a string value --> the column should be converted to string
+        sb.AppendLine("3.15,str");
+
+        WriteToFile(tmpFileName, sb.ToString());
+
+        TableFileParser parser = new TableFileParser();
+        try {
+          parser.Parse(tmpFileName,
+            CultureInfo.InvariantCulture.NumberFormat,
+            CultureInfo.InvariantCulture.DateTimeFormat,
+            separator: ',', columnNamesInFirstLine: true);
+          Assert.IsTrue(parser.Values[0] is List<double>);
+          Assert.IsTrue(parser.Values[1] is List<string>);
+          Assert.AreEqual(parser.Values[1][0], "3.15");
+          Assert.AreEqual(parser.Values[1][2000], "str");
+        }
+
+        finally {
+          File.Delete(tmpFileName);
+        }
       }
     }
