Index: sansguiframe/src/sans/guiframe/data_processor.py
===================================================================
--- sansguiframe/src/sans/guiframe/data_processor.py	(revision 73197d02c6ca39bb72870a1ec48e25d1c3672e24)
+++ sansguiframe/src/sans/guiframe/data_processor.py	(revision 850525c54ac79429fe01acf858d04d4f7de2021b)
@@ -6,4 +6,5 @@
 import math
 import re
+import os
 import sys
 import copy
@@ -625,5 +626,6 @@
     Allow to select where the result of batch will be displayed or stored
     """
-    def __init__(self, parent=None, data=None, *args, **kwds):
+    def __init__(self, parent=None, data=None, file_name="",
+                 details="", *args, **kwds):
         """
         :param parent: Window instantiating this dialog
@@ -631,7 +633,9 @@
                 application.
         """
-        kwds['style'] = wx.CAPTION|wx.SYSTEM_MENU 
+        #kwds['style'] = wx.CAPTION|wx.SYSTEM_MENU 
         wx.Dialog.__init__(self, parent, *args, **kwds)
         self.parent = parent
+        self.file_name = file_name
+        self.details = details
         self.data = data
         self.flag = 1
@@ -667,5 +671,4 @@
         self.external_app_selected.SetValue(False)
         self.save_to_file.SetValue(False)
-  
         button_OK = wx.Button(self, wx.ID_OK, "Ok")
         button_OK.SetFocus()
@@ -700,12 +703,34 @@
         """
         if self.save_to_file.GetValue():
-            self.flag = 3
-            if self.parent is not None and  self.data is not None:
-                self.parent.save_batch_into_file(self.data)
-        elif self.local_app_selected.GetValue():
+            reader, ext = os.path.splitext(self.file_name)
+            path = None
+            location = os.getcwd()
+            if self.parent is not None: 
+                location = self.parent._default_save_location
+                dlg = wx.FileDialog(self, "Save Project file",
+                            location, self.file_name, ext, wx.SAVE)
+                path = None
+                if dlg.ShowModal() == wx.ID_OK:
+                    path = dlg.GetPath()
+                    if self.parent is not None:
+                        self.parent._default_save_location = os.path.dirname(path)
+                dlg.Destroy()
+                if path != None:
+                    if self.parent is not None and  self.data is not None:
+                        self.parent.write_batch_output(data=self.data, 
+                                               file_name=path,
+                                               details=self.details)
+        
+        if self.local_app_selected.GetValue():
             self.flag = 1
         else:
             self.flag = 2
         return self.flag
+    
+    def save_file(self):
+        """
+        Save inot file
+        """
+        
     
   
Index: sansguiframe/src/sans/guiframe/gui_manager.py
===================================================================
--- sansguiframe/src/sans/guiframe/gui_manager.py	(revision 73197d02c6ca39bb72870a1ec48e25d1c3672e24)
+++ sansguiframe/src/sans/guiframe/gui_manager.py	(revision 850525c54ac79429fe01acf858d04d4f7de2021b)
@@ -16,4 +16,5 @@
 import sys
 import xml
+import time
 import py_compile
 # Try to find a local config
@@ -22,4 +23,5 @@
 warnings.simplefilter("ignore")
 import logging
+import win32com
 
 from sans.guiframe.events import EVT_STATUS
@@ -284,13 +286,23 @@
         self.setup_custom_conf()
     
-    def on_set_batch_result(self, data, name):
+    def on_set_batch_result(self, data, plugin_name):
         """
         Display data into a grid in batch mode and show the grid
         """
+        t = time.localtime(time.time())
+        time_str = time.strftime("%b %d %H;%M of %Y", t)
+        name = "Batch"  +  time_str
+        details = "File Generated by %s : %s.\n" % (APPLICATION_NAME,
+                                                     str(plugin_name))
+        details += "on %s.\n" % time_str 
+        ext = ".csv"
+        file_name = "Batch_" + str(plugin_name)+ "_" + time_str + ext
         #Neeed to save configuration for later 
-        dlg = BatchOutputDialog(self, data)
+        dlg = BatchOutputDialog(parent=self, data=data, 
+                                file_name=file_name,
+                                details=details)
         flag = None
         if dlg.ShowModal() == wx.ID_OK:
-            flag = dlg.onselect()
+            flag = dlg.flag
             dlg.Destroy()
         if flag == 1:
@@ -298,14 +310,51 @@
             self.batch_frame.Show(True)
         elif flag == 2:
-            self.deplay_in_external_app(data)
-        
-    def save_batch_into_file(self, data):
-        """
-        Save data into file. default extension is .csv
-        """
-    def deplay_in_external_app(self, data):
+            if not os.path.exists(file_name):
+                self.write_batch_output(data=data, file_name=file_name,
+                                               details=details)
+            self.deplay_in_external_app(data=data, file_name=file_name)
+        
+    def write_batch_output(self, data, file_name, details=""):
+        """
+        Helper to write result from batch into cvs file
+        """
+        
+        if data is None or file_name is None or file_name.strip() == "":
+            return
+        _, ext = os.path.splitext(file_name)
+        
+        fd = open(file_name, 'w')
+        separator = "\t"
+        if ext.lower() == ".csv":
+            separator = ","
+        fd.write(str(details))
+        fd.write(separator)
+        fd.write('\n')
+        for col_name  in data.keys():
+             fd.write(str(col_name))
+             fd.write(separator)
+        fd.write('\n')
+        max_list = [len(value) for value in data.values()]
+        if len(max_list) == 0:
+            return
+        max_index = max(max_list)
+        index = 0
+        while(index < max_index):
+            for value_list in data.values():
+                if index < len(value_list):
+                    fd.write(str(value_list[index]))
+                    fd.write(separator)
+                else:
+                    fd.write('')
+                    fd.write(separator)
+            fd.write('\n')
+            index += 1
+        fd.close()
+            
+    def deplay_in_external_app(self, data, file_name):
         """
         Display data in the another application , by default Excel
         """
+         
     def on_batch_selection(self, event):
         """
