Unable to Export Attriute Data on Form To Excel

My requirement is to export data from PO Summary Result Screen to an Excel.
This can be done using FILE->Export functionality provided by Oracle, however when doing so the attribute columns comes as "[ ]" . I need to display them as an individual columns.
Is there a way to do so by setting up a profile option ?
Need Inputs on the same.

Hi,
you can get this problem resolved by SAP Note Number: <b>765490</b>  (SAP Note 765490 Dump in get_alert_level_frequencies(cl_rsr_www_page))
This is due to dump in get_alert_level_frequencies(cl_rsr_www_page) which is raised because of missing authorization, the dataprovider is not filled with data.
you can get the procedure for exporting the data into a CSV file form the following links.
http://help.sap.com/saphelp_nw04s/helpdata/en/d2/11a28fc26d4042a6d230a9783152f2/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/d2/11a28fc26d4042a6d230a9783152f2/frameset.htm
Assign points if useful,
regards,
rudra.

Similar Messages

  • Exporting Data from Forms to Excel

    Hi,
    How can I export the data from Forms to Excel like which Export function in the Oracle Applications.
    Thank you,
    Voon

    Hello,
    By using dde package you can export the data from Form to Excel. Here is the sample code which i have used. you can write this code in the when_button_pressed trigger.
    declare
    appl_name varchar2(255);
    channel_id pls_integer;
    application_id pls_integer;
    x number;
    y number;
    V_TIME VARCHAR2(30);
    begin
    if :global.application_id is not null then
    message('Application already open');
    else
    appl_name := 'c:\program files\microsoft office\office\excel.exe';
    :global.application_id := dde.app_begin(appl_name,dde.app_mode_normal);
    end if;
    if :global.channel_id is not null then
    message('Communication channel already established.');
    elsif :global.application_id is null then
    message('Application must be launched first.');
    else
    :global.channel_id := dde.initiate('excel','book1');
    end if;
    DDE.POKE(:global.channel_id,'R1C1','Col1 Heading',DDE.CF_TEXT,1000);
    DDE.POKE(:global.channel_id,'R1C2','Col2 Heading',DDE.CF_TEXT,1000);
    DDE.POKE(:global.channel_id,'R1C3','Col3 Heading',DDE.CF_TEXT,1000);
    FIRST_RECORD;
    X := No of Records;
    for y in 2..x
    loop
    launch_excel is a program unit--
    launch_excel(y,:global.channel_id,:block.item1,:block.item2,::block.item3);
    next_record;
    end loop;
    FIRST_RECORD;
    EXCEPTION
    WHEN DDE.DDE_APP_FAILURE THEN
    MESSAGE('Could not launch application for DDE operations.');
    RAISE FORM_TRIGGER_FAILURE;
    WHEN DDE.DDE_INIT_FAILED THEN
    MESSAGE('Could not initialize DDE communication channel.');
    RAISE FORM_TRIGGER_FAILURE;
    WHEN DDE.DMLERR_NO_CONV_ESTABLISHED THEN
    MESSAGE('Could not establish DDE communication channel.');
    RAISE FORM_TRIGGER_FAILURE;
    WHEN OTHERS THEN
    MESSAGE('Error: '&#0124; &#0124;TO_CHAR(SQLCODE)&#0124; &#0124;' '&#0124; &#0124;SQLERRM);
    RAISE FORM_TRIGGER_FAILURE;
    END;
    LAUNCH_EXCEL
    PROCEDURE LAUNCH_EXCEL(
    y in number,
    channel_id pls_integer,
    param1 varchar2,
    param2 VARCHAR2,
    param3 varchar2) IS
    v_rowno varchar2(20) := 'R'&#0124; &#0124;y;
    BEGIN
    dde.poke(channel_id,v_rowno&#0124; &#0124;'C1',col1,dde.cf_text,2000);
    dde.poke(channel_id,v_rowno&#0124; &#0124;'C2',col2,dde.cf_text,2000);
    dde.poke(channel_id,v_rowno&#0124; &#0124;'C3',col3,dde.cf_text,2000);
    EXCEPTION
    when others then
    message('Error --'&#0124; &#0124;sqlcode&#0124; &#0124;sqlerrm);
    message('Error --'&#0124; &#0124;sqlcode&#0124; &#0124;sqlerrm);
    raise form_trigger_failure;
    END;
    null

  • Export data from forms to excel

    HI
    In my application im trying to export data from forms to excel.Everything works fine.First of all im using get_file_name for selecttion of file and passing it to ole2 package as follows
    FILENAME := GET_FILE_NAME(File_Filter=> 'XLS Files (*.xls)|*.xls|',dialog_type=>SAVE_FILE);
         ARGS:=OLE2.CREATE_ARGLIST;
         oLE2.ADD_ARG(ARGS,Filename);
         OLE2.INVOKE(WORKSHEET,'SAVEAS',ARGS);
    The problem is if i select an existing file the get_file_name itself raises one message ".....file already exists Replace an existing file?"
    Similarly the excel also also raises the same message "".....file already exists Replace an existing file?".I want to suppress atleast one of them? Could anyone help for this problem?
    appreciate ur help
    THANKS

    Looks like...
    ole2.set_property( ex_app, 'DisplayAlerts', false );
    where "ex_app" variable Excel Application -
         ex_app:=     ole2.create_obj('Excel.Application');
    and more Question:
    When i close excel app - in process viewer i see "excel.exe"
    ole2.release_obj don't work :(

  • XML export "unable to export the data."

    Strictly speaking I am just using the GUI, not trying to do this programmatically.  But this is related to a development project & I figure the dev forum will have better insight.
    Attempting to do a simple export of a plain table from Access. right-click table>export>XML>"OK">checkdata only>"OK"
    ...unable to export the data.
    A very unhelpful error message with zero indication of the reason or how to correct it.  This is a single, simple table.  Exporting other formats is fine.
    What should I even be looking for as a cause for this?  How hard is it to dump a table into XML with tags for <record> or <row> and tags for the column names?

    What you call a simple export Access may not. What are the data types of the fields in this table? Can you post a copy of your table, with only some test data, to a public place like a free OneDrive account?
    Surely I agree you should be afforded a better error message regardless.
    -Tom. Microsoft Access MVP

  • Can you export the date and user to Excel that appears into a Comments field in a tracking list?

    Hi everyone,
    Can you export the date and user to Excel that appears into a Comments field in a tracking list?
    When i export a tracking list with a Comment field in the Content type, the screen where you enter the data for an item, the Comments field just export the text of the comment into the Excel file.
    In the Comments field appears also, besides the comment text,  the user and date from who and when the comment is added.
    Is there a way to export also the user and the date?
    Thanks
    Wim

    create another comment field that doesn't use 'appending', and through SP Designer change workflow keep
    updating that field with the new comments  (prepend the field with date/username/new comment). Hide the field on all forms, but put it in the view you need to export to Excel.
    Please refer few more links: Hope they will help
    http://www.nothingbutsharepoint.com/2009/04/16/versioning-append-changes-to-existing-text-view-entries-aspx/
    http://sympmarc.com/2011/02/07/showing-all-versions-of-append-changes-to-existing-text-in-a-data-view-web-part-dvwp/comment-page-3/
    https://mossipqueen.wordpress.com/2013/03/06/display-all-appending-field-entries-in-a-single-list-view/
    http://community.office365.com/en-us/f/154/t/278560.aspx
    Please 'propose as answer' if it helped you, also 'vote helpful' if you like this reply.

  • How to export the data from table to excel sheet

    hi experts i have some problem am trying to export the data fro table to Excel sheet  in the view controller i have created one button wit public void onActionCLEAR(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionCLEAR(ServerEvent)
       //wdContext.nodeBapi_Salesorder_Getlist_Input().
       //wdContext.nodeBapi_Salesorder_Getlist_Input().invalidate();
        //@@end
      //@@begin javadoc:onActionExporToExcel(ServerEvent)
      /** Declared validating event handler. */
      //@@end
      public void onActionExporToExcel(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionExporToExcel(ServerEvent)
         try{
         FileOutputStream fos=new FileOutputStream("Test.xls");
          PrintStream ps=new PrintStream(fos);
          ps.println("<html><body><table border=1>");
          int size=wdContext.nodeBapi_Salesorder_Getlist_Input().size();
           Iterator attributes=wdContext.getNodeInfo().iterateAttributes();
           ps.println("<tr>");
           while(attributes.hasNext()){
            ps.println("<th>");
            DataAttributeInfo attrName=(DataAttributeInfo)attributes.next();
            ps.println(attrName.getName());
            ps.println("</th>");
           ps.println("</tr>");
          for(int i=0; i<wdContext.nodeBapi_Salesorder_Getlist_Input().size();i++)
            attributes=wdContext.getNodeInfo().iterateAttributes();
            ps.println("<tr>");
            IWDNodeElement ele=wdContext.getElementAt(i);
            while(attributes.hasNext()){
              ps.println("<td>");
              DataAttributeInfo attrName=(DataAttributeInfo)attributes.next();
              ps.println(""+ele.getAttributeAsText(attrName.getName()));
              ps.println("</td>");
            ps.println("</tr>");
           ps.println("</table></body></html>");
           ps.flush();
           ps.close();
           fos.close();
          catch(Exception e){
           wdComponentAPI.getMessageManager().reportException(e.getMessage(), false);
          finally{
         //return("Test.xls")  ;
        //@@end
      }h action and i have return the code
    its running sucessfully but am not able to perform the action plz help me

    Hi,
    You shouldn't use DataAttributeInfo as it is an internal object, if I'm correct.
    Use IWDAttributeInfo instead of DataAttributeInfo and it should work
    (See also API doc of IWDNodeInfo.iterateAttributes() at http://help.sap.com/javadocs/nwce/ce711sp02/wdr/com.sap.wdr/com/sap/tc/webdynpro/progmodel/api/IWDNodeInfo.html#iterateAttributes())
    Cheers,
    Robin

  • Is it possible to export my list of forms to Excel

    is it possible to export my list of forms to Excel

    is it possible to export my list of forms to Excel

  • Unable to export real data

    dear experts,
    I have tried to find discussions on this already but after wadding through a few pages, I thought I could be helped faster if I threaded this topic.
    I have been able to successfully log into an oracle db and was looking to export about 35 tables.
    So far, the way I was instructed to do this is query the data to list those tables, then right-click on each table and export it.
    First, I tried doing that but rather than export the data in each table, it is export the table structure.
    What am I doing wrong?
    Second, perhaps more importantly, is there a more efficient way to export those tables?
    Many thanks in advance

    Selecting multiple tables in the Schema Browser and right clicking will only allow export of the DDL sql. Selecting a single table and right clicking gives and export data option with several options for the export type (SQL, csv, SQL Loader, xls etc.). Right clicking on the data in the data tab gives the same set of options as does right clicking on the data in the results tab of a SQL Worksheet.
    A better way is to use the menu option ,Tools->Database Export' and select the objects and data you want to export. This will export everything selected as SQL.
    HTH
    Chris

  • How to export the data as integer into excel sheet?

    Hi All,
         I am working on export to excel functionality and using JEXCEL API to create it.  When I export the data to excel sheet, the data are stored in text format in the excel sheet.  If I click on summation button on excel sheet,  it is not summing up the column values since it is stored as the text format. 
    I am writing the following code:
    for(Iterator iter = columnInfos.keySet().iterator(); iter.hasNext();){
    String attributeName = (String)iter.next();
    for(int index = 0; index < dataNode.size(); index++){
    try{
    IWDNodeElement nodeElement = dataNode.getElementAt(index);
    String colVal = nodeElement.getAttributeAsTex(attributeName);
    Label value = new Label(j, index + 1, colVal);
    sheet.addCell(value);
    j++;
    Here colVal is the variable which holds the data in string format.  So I was just trying to convert it into integer format and used Integer.parseInt(colVal).
    But Label keyword accepts only the int,int,string arguments. 
    Is there any other option to change it as integer value while exporting to excel sheet.
    Pls suggest.
    This is very urgent.
    Regards,
    Subashini.

    Hi Gopal,
    Pls refer the following link.
    /people/subramanian.venkateswaran2/blog/2006/08/16/exporting-table-data-to-ms-excel-sheetenhanced-web-dynpro-binary-cache
    I have used the same coding which is mentioned in this link. 
    And also I cannot use integer.parseInt(colval)  because new Label()  will accept only the int,int,string as parameters. 
    Here goes my to excel method code which exports the data to excel sheet .
    private FileInputStream toExcel(IWDNode dataNode, Map columnInfos) {
    String fileName = "output.xls";
    IWDCachedWebResource cachedExcelResource = null;
    int i = 0;
    try{
    File f = new File("output.xls");
    WritableWorkbook workbook = Workbook.createWorkbook(f);
    WritableSheet sheet = workbook.createSheet("First Sheet", 0);
    for(Iterator coluinfoitr = columnInfos.keySet().iterator(); coluinfoitr.hasNext();){
    Label label = new Label(i, 0, (String)columnInfos.get(coluinfoitr.next()));
    sheet.addCell(label);
    i++;
    int j = 0;
    for(Iterator iter = columnInfos.keySet().iterator(); iter.hasNext();){
    String attributeName = (String)iter.next();
    for(int index = 0; index < dataNode.size(); index++){
    try{
    IWDNodeElement nodeElement = dataNode.getElementAt(index);
    String colVal = nodeElement.getAttributeAsText(attributeName);
    Label value = new Label(j, index + 1, colVal);
    sheet.addCell(value);
    catch (Exception e){
    wdComponentAPI.getMessageManager().reportException(" Data Retrive Err :" + e.getLocalizedMessage(),false);
    j++;
    workbook.write();
    FileInputStream excelCSVFile = new FileInputStream(f);
    cachedExcelResource = getCachedWebResource(excelCSVFile, fileName, WDWebResourceType.getWebResourceType("xls", "application/ms-excel"));
    wdContext.currentContextElement().setExcelDownload(cachedExcelResource.getURL());
    workbook.close();
    It is exporting the data in text format.  So I am unable to sum up the column values in the excel sheet.
    I need an alternate solution wherein I can export the data in integer format to excel sheet and then sum up the column values by clicking on summation button.
    Hope I am clear now.
    Pls suggest.
    Regards,
    Subashini.

  • Exporting Dynamic data to a formatted excel-readable array

    Hi all,
    I am trying to export some data into an excel sheet (csv) by creating a new file in which the data is stored. With the current set up that i have, i keep on running into the following problems:
    1. After every iteration in a single run, a dialogue box pops up and asks me  where to save the data, after i have already specified a file name
    2. The data format in the excel file is not what i wasnt. The data is all displayed as one string while i would like it to store the data in different columns.
    Some background: In the section of the vi that i have attached, i use 2 DAQ assistants. The first is used to obtain the initial voltage value at the 2 piezos which is then fed into the rest of the vi, this needs to be done just once, at the beginning of the vi run. The second DAQ asst is used to monitor and save the voltage as it is gradually increased and applied to the piezos.
    A picture of the section of the vi im having trouble with is attached, along with the entire vi.
    I would appreciate any help you can give me on these problems.
    Thanks!
    Attachments:
    errorvi.JPG ‏50 KB
    Coordinate Writing V2.vi ‏166 KB

    I Cant run your vi at the moment but from what i can see.
    - use the file open vi from the file I/O pallette rather than the Express file open VI you have and supply it with a proper path, not a string.
    - I prefer to use .csv (Commas Seperated) instead of tab seperated as i find it easier to read in a string indicator or similar and is just as easy to open in excell.
    - How many Samples is your 2nd Express DAQ function doing?  If it is multiple you will need to seperate the samples by comma also (or average them out etc).
    - I rarely use dynamic data but i think you would be best to extract the actual data values out from the data type at least to get you up and running (It is coerced at the moment and may not be doing what you expect it to do).
    craigc
    Message Edited by craigc on 05-19-2009 03:24 AM
    LabVIEW 2012

  • Importing data from form to excel (beginner)

    I need assistance with a pretty lengthy survey I'm creating. I am finding it difficult to find answers on the question/help and in the forums largely because I don't know what the right questions to ask are.
    I would like to create a survey where the end-uese fills it in and emails it to me. I would like to take the xml file received via email and import the results into an excel spreadsheet, one line per each survey result.
    The biggest problem is that I know enough to get myself into trouble but not enough to get myself out of it and any and all assistance would be appreciated.
    Thanks

    Similar to the original posting, I have also created a form for individuals to complete and email back to me. I will not be receiving a one time response, however, these individuals will email me a newly completed copy of the form at various times throughout the year for multiple years.  I need to get the data into a designated excel spreadsheet each time I receive a newly completed form. What is the simplest way to achieve this?
    Thank you

  • Adobe Acrobat XPro - Unable to set automatic date in form

    Hello -
    I created a layout in Indesign and brought it into Adobe Acrobat XPro to create a form.
    I have not been able to get the form to automatically populate a date when it opens. In fact, I am unable to even type in the box now. I entered this code under validate in the text properties:
    var f = this.getField("Today");
    f.value = util.printd("m/d/yy", new Date());
    I also entered this code in another area:
    Under page properties, page thumbnails and page properties. Under actions - Select trigger - page open. I added a run a javascript action:
    var f = this.getField("Today");
    f.value = util.printd("m/d/yy", new Date());
    Please help. Thanks so much!

    You can use the following code to catch and display the error message:
    try{
    var f = this.getField("Today");
    f.value = util.printd("m/d/yy", new Date());
    } catch(e) {
    var cMsg = "An error occurred setting the date\n";
    for(var i in e) {
    cMsg += "\n" + i + ": " + e[i];
    app.alert(cMsg, 1, 0);
    If the error message displays "f is null" then you have a missing field or are using the wrong field name.

  • Unable to export to pdf in Form Central

    I am attempting to export either a form or a report to pdf, everytime I try I get this error: The file was not saved because either you have cancelled, or a previous version of the file was open and could not be overwritten.
    I am the only one testing this right now so I am not sure why I am getting the error.
    I am using IE8, only one allowed now by my company.

    Hi,
    This behavior has been reported before when a user upgraded their Flash Player version prior to working with FormsCentral in IE8. The issue was resolved by signing out of FormsCentral and closing the browser. Could you please try that?
    Thanks,
    Brian

  • Exception while Exporting Datagridview data with Images to Excel...

    Hi Everyone,
    I have datagridview in that 17 columns are text columns and 5 columns are Image columns,when I'm trying to export whole gridview data's along with images to EXCEL,getting "HRESULT:
    0x800A03EC" Error..While debugging the code I'm getting the error on image column not able to export..
    Can anybody help us to resolve this issue..
    Here is my code which i used:
    private void btnexportexcel_Click(object sender, EventArgs e)
    try
    SaveFileDialog savefile = new SaveFileDialog();
    savefile.Filter = "Excel (*.xls)|*.xls";
    if (savefile.ShowDialog() == DialogResult.OK)
    if (!savefile.FileName.Equals(string.Empty))
    FileInfo finfo = new FileInfo(savefile.FileName);
    if (finfo.Extension.Equals(".xls"))
    Excel.Application xlApp;
    Excel.Workbook xlWorkBook;
    Excel.Worksheet xlWorkSheet;
    object misValue = System.Reflection.Missing.Value;
    xlApp = new Excel.Application();
    xlWorkBook = xlApp.Workbooks.Add(misValue);
    xlWorkSheet = (Excel.Worksheet)xlWorkBook.Worksheets.get_Item(2) ;
    int i = 0;
    int j = 0;
    for (i = 0; i <= dataGridView1.RowCount - 1; i++)
    for (j = 0; j <= dataGridView1.ColumnCount - 1; j++)
    DataGridViewCell cell = dataGridView1[j, i];
    xlWorkSheet.Cells.Borders.LineStyle = Excel.XlLineStyle.xlContinuous;
    xlWorkSheet.Columns.AutoFit();
    if (cell.Value.GetType() == typeof(Bitmap))
    string image =Convert.ToString(dataGridView1.CurrentRow.Cells[i].Value); 
    Excel.Range oRange = (Excel.Range)xlWorkSheet.Cells[i + 1, j + 1];
    float Left = (float)((double)oRange.Left);
    float Top = (float)((double)oRange.Top);
    const float ImageSize = 32;
    xlWorkSheet.Shapes.AddPicture(image, Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoCTrue, Left, Top, ImageSize, ImageSize);
    oRange.RowHeight = ImageSize + 2; 
    else
    xlWorkSheet.Cells[i + 1, j + 1] = cell.Value;
    xlWorkBook.SaveAs(savefile.FileName, Excel.XlFileFormat.xlWorkbookNormal, misValue, misValue, misValue, misValue,
    Excel.XlSaveAsAccessMode.xlExclusive, misValue, misValue, misValue, misValue, misValue);
    xlWorkBook.Close(true, misValue, misValue);
    xlApp.Quit();
    releaseObject(xlWorkSheet);
    releaseObject(xlWorkBook);
    releaseObject(xlApp);
    MessageBox.Show("Excel file created , you can find the file " + savefile.FileName);
    else
    MessageBox.Show("Invalid file type");
    else
    MessageBox.Show("You did pick a location " + "to save file to");
    catch (Exception ex)
    MessageBox.Show("Exception Occured", ex.Message);
    Thanks & Regards RAJENDRAN M

    Hi Everyone,
    I have datagridview in that 17 columns are text columns and 5 columns are Image columns,when I'm trying to export whole gridview data's along with images to EXCEL,getting "HRESULT:
    0x800A03EC" Error..While debugging the code I'm getting the error on image column not able to export..
    Can anybody help us to resolve this issue..
    Here is my code which i used:
    private void btnexportexcel_Click(object sender, EventArgs e)
    try
    SaveFileDialog savefile = new SaveFileDialog();
    savefile.Filter = "Excel (*.xls)|*.xls";
    if (savefile.ShowDialog() == DialogResult.OK)
    if (!savefile.FileName.Equals(string.Empty))
    FileInfo finfo = new FileInfo(savefile.FileName);
    if (finfo.Extension.Equals(".xls"))
    Excel.Application xlApp;
    Excel.Workbook xlWorkBook;
    Excel.Worksheet xlWorkSheet;
    object misValue = System.Reflection.Missing.Value;
    xlApp = new Excel.Application();
    xlWorkBook = xlApp.Workbooks.Add(misValue);
    xlWorkSheet = (Excel.Worksheet)xlWorkBook.Worksheets.get_Item(2) ;
    int i = 0;
    int j = 0;
    for (i = 0; i <= dataGridView1.RowCount - 1; i++)
    for (j = 0; j <= dataGridView1.ColumnCount - 1; j++)
    DataGridViewCell cell = dataGridView1[j, i];
    xlWorkSheet.Cells.Borders.LineStyle = Excel.XlLineStyle.xlContinuous;
    xlWorkSheet.Columns.AutoFit();
    if (cell.Value.GetType() == typeof(Bitmap))
    string image =Convert.ToString(dataGridView1.CurrentRow.Cells[i].Value); 
    Excel.Range oRange = (Excel.Range)xlWorkSheet.Cells[i + 1, j + 1];
    float Left = (float)((double)oRange.Left);
    float Top = (float)((double)oRange.Top);
    const float ImageSize = 32;
    xlWorkSheet.Shapes.AddPicture(image, Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoCTrue, Left, Top, ImageSize, ImageSize);
    oRange.RowHeight = ImageSize + 2; 
    else
    xlWorkSheet.Cells[i + 1, j + 1] = cell.Value;
    xlWorkBook.SaveAs(savefile.FileName, Excel.XlFileFormat.xlWorkbookNormal, misValue, misValue, misValue, misValue,
    Excel.XlSaveAsAccessMode.xlExclusive, misValue, misValue, misValue, misValue, misValue);
    xlWorkBook.Close(true, misValue, misValue);
    xlApp.Quit();
    releaseObject(xlWorkSheet);
    releaseObject(xlWorkBook);
    releaseObject(xlApp);
    MessageBox.Show("Excel file created , you can find the file " + savefile.FileName);
    else
    MessageBox.Show("Invalid file type");
    else
    MessageBox.Show("You did pick a location " + "to save file to");
    catch (Exception ex)
    MessageBox.Show("Exception Occured", ex.Message);
    Thanks & Regards RAJENDRAN M

  • Transfer of Data from Form to Excel

    I would like the data shown on the forms to be transferred to excel sheet. This is because the users would like to do certain manipultaion on the data. How is this possible. Kindly let me know
    Thanks in advance
    Gaurav

    We transfered it generating a text archive *.txt.
    "field 1","field 2",...
    And the user could open it from excel
    We tried to create as *.xls, but we had problems because when they open directly.
    You can try it too. And can try distinct separators like char(9) (tab)

Maybe you are looking for