title: Writing Excel FIle through Erlang
body: <p>i am trying to write excel file through erlang. I used the following code to write the excel file</p>
  
  <pre><code>-module(excel).
  -export([start/1]).
  
  start(Val)-&gt;
          case  file:open("office-test.xls",[append]) of
          {ok,Fd} -&gt; io:format(" file created"),
                  io:fwrite(Fd,"~p\t~p\t~p~n", ["Name","Date","Number"]),
                  export(Fd,Val),
                  file:close(Fd);
          {error,_} -&gt;  io:format("~nerror in creation of file")
          end.
  
  
  export(_,0)-&gt;
          ok;
  
  export(Fd,Val) -&gt;
          io:fwrite(Fd, "~p\t~p\t~p\t~n" ,["B123","2012/10/11 12:12:12","val"++integer_to_list(Val)]),
          export(Fd,Val-1).
  </code></pre>
  
  <p>It was able to write successfully but when i open in LibreOffice. I got up a pop-up window asking the data seperated by. I dont want the end user to work on it.</p>
  
  <p>1) Is there any way such that the office(ms office or libre office) will automatically parse it.?? </p>
  
  <p>2) Is there any other way to write the excel sheets through erlang..??</p>