Index: branches/HeuristicLab.DataImporter/HeuristicLab.DataImporter.DataProcessor/DataProcessorView.cs
===================================================================
--- branches/HeuristicLab.DataImporter/HeuristicLab.DataImporter.DataProcessor/DataProcessorView.cs	(revision 7730)
+++ branches/HeuristicLab.DataImporter/HeuristicLab.DataImporter.DataProcessor/DataProcessorView.cs	(revision 7868)
@@ -21,14 +21,11 @@
 
 using System;
+using System.Collections;
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Drawing;
 using System.Linq;
-using System.Text;
 using System.Windows.Forms;
-using System.IO;
-using System.Reflection;
-using HeuristicLab.PluginInfrastructure;
-using HeuristicLab.DataImporter.DbExplorer.Interfaces;
+using System.Xml;
 using HeuristicLab.DataImporter.Data;
 using HeuristicLab.DataImporter.Data.CommandBase;
@@ -36,6 +33,8 @@
 using HeuristicLab.DataImporter.Data.View;
 using HeuristicLab.DataImporter.DataProcessor.Command;
-using System.Xml;
+using HeuristicLab.DataImporter.DbExplorer.Interfaces;
 using HeuristicLab.Persistence.Default.Xml;
+using HeuristicLab.PluginInfrastructure;
+using HeuristicLab.Problems.DataAnalysis;
 
 namespace HeuristicLab.DataImporter.DataProcessor {
@@ -357,11 +356,11 @@
         this.SaveAs();
       else
-        this.Save(this.lastSavedFile);
-    }
-
-    private void Save(string filename) {
+        this.Save(dataProcessor, this.lastSavedFile);
+    }
+
+    private void Save(object serialize, string filename) {
       try {
         this.Cursor = Cursors.WaitCursor;
-        XmlGenerator.Serialize(this.dataProcessor, filename,9);
+        XmlGenerator.Serialize(serialize, filename, 9);
         this.Cursor = Cursors.Default;
         this.Text = "Data Importer - " + lastSavedFile;
@@ -377,11 +376,50 @@
       saveFileDialog.AddExtension = true;
       saveFileDialog.RestoreDirectory = true;
+      saveFileDialog.Filter = "Regression Problem file (*.hl)|*.hl|Classification Problem file (*.hl)|*.hl|DataImporter file (*.dhl)|*.dhl|All files (*.*)|*.*";
       saveFileDialog.DefaultExt = "dhl";
-      saveFileDialog.Filter = "DataImporter file (*.dhl)|*.dhl|All files (*.*)|*.*";
+      saveFileDialog.FilterIndex = 3;
 
       if (saveFileDialog.ShowDialog() == DialogResult.OK) {
         this.lastSavedFile = saveFileDialog.FileName;
-        this.Save(this.lastSavedFile);
-      }
+        if (saveFileDialog.FilterIndex <= 2) {
+          Dataset dataset = ConvertDataset(dataProcessor.DataSet);
+          DataAnalysisProblemData problemData = null;
+          if (saveFileDialog.FilterIndex == 1) {
+            problemData = new RegressionProblemData(dataset, dataset.VariableNames, dataset.VariableNames.First());
+          } else if (saveFileDialog.FilterIndex == 2) {
+            problemData = new ClassificationProblemData(dataset, dataset.VariableNames, dataset.VariableNames.First());
+          } else {
+            throw new ArgumentException("File extension doesn't exist");
+          }
+          Save(problemData, lastSavedFile);
+        } else {
+          Save(dataProcessor, lastSavedFile);
+        }
+      }
+    }
+
+    private Dataset ConvertDataset(DataSet dataSet) {
+      ColumnGroup cg;
+      if (dataSet.ActiveColumnGroups.Count() > 0) {
+        cg = dataSet.ActiveColumnGroups.First();
+      } else if (dataSet.ColumnGroups.Count() > 0) {
+        cg = dataSet.ColumnGroups.First();
+      } else {
+        throw new ArgumentException("There exists no ColumnGroup which could be saved!");
+      }
+      List<IList> values = new List<IList>();
+      foreach (var column in cg.Columns) {
+        if (column.DataType.Equals(typeof(double?))) {
+          values.Add(column.ValuesEnumerable.Cast<double?>().Select(x => x == null ? double.NaN : x).Cast<double>().ToList());
+        } else if (column.DataType.Equals(typeof(string))) {
+          values.Add(column.ValuesEnumerable.Cast<string>().ToList());
+        } else if (column.DataType.Equals(typeof(DateTime?))) {
+          values.Add(column.ValuesEnumerable.Cast<DateTime?>().Select(x => x == null ? new DateTime() : x).Cast<DateTime>().ToList());
+        } else {
+          throw new ArgumentException("The variable values must be of type List<double>, List<string> or List<DateTime>");
+        }
+      }
+      IEnumerable<string> variableNames = cg.Columns.Select(x => x.Name);
+      return new Dataset(variableNames, values);
     }
 
@@ -425,5 +463,5 @@
         try {
           this.Cursor = Cursors.WaitCursor;
-          XmlGenerator.Serialize(this.dataProcessor.CommandChain, saveFileDialog.FileName,9);
+          XmlGenerator.Serialize(this.dataProcessor.CommandChain, saveFileDialog.FileName, 9);
         }
         finally {
Index: branches/HeuristicLab.DataImporter/HeuristicLab.DataImporter.DataProcessor/HeuristicLab.DataImporter.DataProcessor.csproj
===================================================================
--- branches/HeuristicLab.DataImporter/HeuristicLab.DataImporter.DataProcessor/HeuristicLab.DataImporter.DataProcessor.csproj	(revision 7730)
+++ branches/HeuristicLab.DataImporter/HeuristicLab.DataImporter.DataProcessor/HeuristicLab.DataImporter.DataProcessor.csproj	(revision 7868)
@@ -94,8 +94,11 @@
   </PropertyGroup>
   <ItemGroup>
+    <Reference Include="HeuristicLab.Common-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" />
     <Reference Include="HeuristicLab.Common.Resources-3.3">
       <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Common.Resources-3.3.dll</HintPath>
       <Private>False</Private>
     </Reference>
+    <Reference Include="HeuristicLab.Core-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" />
+    <Reference Include="HeuristicLab.Data-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" />
     <Reference Include="HeuristicLab.Persistence-3.3">
       <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.Persistence-3.3.dll</HintPath>
@@ -106,4 +109,5 @@
       <Private>False</Private>
     </Reference>
+    <Reference Include="HeuristicLab.Problems.DataAnalysis-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" />
     <Reference Include="System" />
     <Reference Include="System.Core">
