How to write heading in the xls file with each of the channel in each column?

Dear All,
While writing the data into the xls file through .lvm method I want the Headong for each channel to be include on each of the column, but i dint know how to do this? is this possible in the LabVIEW from any of the file writing method? if yes how can i do that? please help me.........
Thanks,
Nishant Desai

Thanks Chilly,
Its a really fantastic idea, and it works for me too, but the thing inside was every time once it writes the heading and then it write the data again after that it wirtes the heading and write the data, but i ve copup with dat and i ve modified the vi which u ve given to me, i am attaching that vi to with this.
wat i ve done is just putting the write to spreadsheet data vi into the while loop and other all are outside the while loop, which makes the heading to write once and data to write continuosly.
Thanks & Regards,
Nishant Desai
Attachments:
Write channel names_yours.vi ‏25 KB
Write channel names_mine.vi ‏31 KB

Similar Messages

  • How to get Header in Downloaded .xls file using  GUI_Download function

    How to get Header in Downloaded .xls file using  GUI_Download function ???
    How to use the the Header parameter available in GUI_Download function .

    HI,
    see this sample code..
    data : Begin of t_header occurs 0,
           name(30) type c,
           end of t_header.
    data : Begin of itab occurs 0,
           fld1 type char10,
           fld2 type char10,
           fld3 type char10,
           end   of itab.
    DATA: v_pass_path TYPE string.
    append itab.
    itab-fld1 = 'Hi'.
    itab-fld2 = 'hello'.
    itab-fld3 = 'welcome'.
    append itab.
    append itab.
    append itab.
    append itab.
    append itab.
    t_header-name = 'Field1'.
    append t_header.
    t_header-name = 'Field2'.
    append t_header.
    t_header-name = 'Field3'.
    append t_header.
      CALL FUNCTION 'GUI_FILE_SAVE_DIALOG'
        EXPORTING
          default_extension     = 'XLS'
        IMPORTING
          fullpath              = v_pass_path.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                        = v_pass_path
          filetype                        = 'DBF'
        TABLES
          data_tab                        = itab
          FIELDNAMES                      = t_header
    Cheers,
    jose.

  • How to write Strings in a text file with BufferedWriter

    I've got a Vector object full of Strings objects, I'm interested in wrinting these Strings in a text file with a BufferedWriter , I would apreciate some code, thank you

    http://java.sun.com/products/jdk/1.2/docs/api/java/io/BufferedWriter.html
    "PrintWriter out = new PrintWriter(new BufferedWriter((new FileWriter("foo.out")));"

  • To open & Edit the XLS file in edit mode after Extracting SAP data into it

    Hello Experts,
      I have a requirement to open and edit the xls file imidiately after downlaoding the SAP data into this XLS file. The XLS file is getting saved on presentation server (e.g. Destop/C: drive).
      I have used function module "GUI_DOWNLOAD" OR "DOWNLAOD" to download the data from SAP table to XLS file. But now I need this XLS file to be get opned automatically after finishing the Download, so that user can make changes into XLS file and can save the changes into it. After saving I have to upload this modified Data into SAP table again.
    For this I am really not aware how to get it done..but I believe you experts will definately help me out..waiting for your reply.
    Thanks,

    HI,
    did you ur problem was solved if not check this code once.
    now only i tried it my system , it opens xl file and save all data in it.
    DATA: ZKNA1 LIKE STANDARD TABLE OF KNA1 WITH HEADER LINE.
    SELECT * FROM KNA1 INTO TABLE ZKNA1.
    CALL FUNCTION 'MS_EXCEL_OLE_STANDARD_DAT'
      EXPORTING
        FILE_NAME                       = 'C:\Documents and Settings\rajesh.NACL\Desktop\XLSSDSDS.XLS'
      CREATE_PIVOT                    = 0
      DATA_SHEET_NAME                 = ' '
      PIVOT_SHEET_NAME                = ' '
      PASSWORD                        = ' '
      PASSWORD_OPTION                 = 0
    TABLES
      PIVOT_FIELD_TAB                 =
       DATA_TAB                        = ZKNA1[]
      FIELDNAMES                      =
    EXCEPTIONS
      FILE_NOT_EXIST                  = 1
      FILENAME_EXPECTED               = 2
      COMMUNICATION_ERROR             = 3
      OLE_OBJECT_METHOD_ERROR         = 4
      OLE_OBJECT_PROPERTY_ERROR       = 5
      INVALID_PIVOT_FIELDS            = 6
      DOWNLOAD_PROBLEM                = 7
      OTHERS                          = 8
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    thanq,
    rajesh.k

  • How can I process an xml/xsl file pair that require the Internet Explorer dom?

    My personal navigation device (GPS) generates xml files that contain a record of where I have been, together with when I was there, how fast I was driving at the time, etc. taken at approx. 5 second intervals. This xml file has an xml-stylesheet with type="text/xsl" but that stylesheet is written to the Internet Explorer dom standard. The stylesheet interfaces with google maps to display a map that shows my path and it also displays tables of data including distances that are computed from latitude/longitude pairs. I can supply a small sample xml file and the xsl file as well if they are needed to diagnose my problem. I cannot find any browser other than Internet Explorer that handles these files satisfactorily. I prefer to process them from a Linux environment but with the Internet Explorer requirement I cannot do so. The browsers that I have tried and that have failed are Firefox, Opera, Konqueror, Chrome, Epiphany, Midori, Arora, and Links.
    One line in the xls file in particular gives grief in the browsers like Firefox that at least attempt to do more than display the raw xml file:
    xmlns:cymath="urn:smiletime-cybarber-net:math"
    A comment in the xls file says this about the problem:
    "Tested and currently only compatible with Internet Explorer version 6 or version 7 (as this script includes JScript functions called by XSL, msxsl:script extension is required; also, the produced XHTML document embeds javascript functions exploiting the IE DOM).
    "In order to provide compatibility with Firefox, other than checking the compatibility of the IE DOM, the cymath:distCosineLaw function still needs to be ported."

    You may get an answer, but it is not really the sort of subject covered by this forum, I suggest you try [http://forums.mozillazine.org/viewforum.php?f=49 Mozilazine] and if you solve the problem post back again.

  • How do  I add an attachment (xls file in my case) to the pdf

    Hello,
    I need to add a excel file as attachment in the generated PDF form.
    Someone could tell me if this is possible and how to do it?
    Thanks for the help

    Hi,
    I did little research and found that we can attach any attachment to Interactive form.
    1.Get the XLS attachment(You can add File Upload UI Element(Say XLS) to your Application  and Bind  data,filename and mime Type  Properties)   with this , user can choose the XLS file to be attached from Desk top.
    2. In the Interactive UI Element,bind the property "pdfsource" (Say PDF_SOURCE), this will  contains the PDF in xstring format.
    3. Add a button (Say Attach XLS) on the application and add an Action Method.(Say ADD)
    4.in the Action Method(ADD) of the Button, follow the Steps.
        1. Get the File(XLS File) Uploaded,Mimi Type  from File Uploade UI Element(Say lv_xls_data,lv_mimetype,lv_file_name)
         2. get the pdf source( PDF_SOURCE) from Interactive form.(Say lv_pdf_source)
         use the Following Code
    DATA: l_fp           TYPE REF TO if_fp,
            l_pdfobj       TYPE REF TO if_fp_pdf_object,
            l_pdf          TYPE xstring,
            l_att          TYPE xstring,
            l_fpex         TYPE REF TO cx_fp_runtime,
            l_type         TYPE string,
            l_errmsg       TYPE string,
            l_short        TYPE sdba_actid,
            l_ext          TYPE sdba_funct,
            l_filename     TYPE skwf_filnm,
            l_mimetype     TYPE skwf_mime,
            l_attachment   TYPE sfpattachments,
            l_attachments  TYPE tfpattachments,
            l_len          TYPE i,
            l_tab          TYPE tsfixml,
            p_dest         TYPE rfcdest .
      MOVE cl_fp=>get_ads_connection( ) TO p_dest.
      l_mimetype   = lv_mimetype.
    * Get FP reference.
      l_fp = cl_fp=>get_reference( ).
      TRY.
    *     Create PDF Object.
          l_pdfobj = l_fp->create_pdf_object( connection = p_dest ).
    *     Set document.
          l_pdfobj->set_document( pdfdata = lv_pdf_source ).
           l_attachment-FILENAME = lv_file_name."Name of the Attached File.
          l_attachment-mimetype    = lv_mimetype.
          l_attachment-description = 'XLS_Attachment'.   
         l_attachment-data        = lv_xls_data."XLS File to Be attached .
          INSERT l_attachment INTO TABLE l_attachments.
          l_pdfobj->set_attachments( attachments = l_attachments ).
    *     Execute, call ADS.
          l_pdfobj->execute( ).
    *     Get result.
          l_pdfobj->get_document( IMPORTING pdfdata = l_pdf ).
        CATCH cx_fp_runtime_internal INTO l_fpex.           "#EC NO_HANDLER
        CATCH cx_fp_runtime_system INTO l_fpex.             "#EC NO_HANDLER
        CATCH cx_fp_runtime_usage INTO l_fpex.              "#EC NO_HANDLER
      ENDTRY.
    Finally "l_pdf" contains the PDF with Attached XLS and you can send this as PDF Document.
    Thanks.
    Uma

  • How can I write new objects to the existing file with already written objec

    Hi,
    I've got a problem in my app.
    Namely, my app stores data as objects written to the files. Everything is OK, when I write some data (objects of a class defined by me) to the file (by using writeObject method from ObjectOutputStream) and then I'm reading it sequencially by the corresponding readObject method (from ObjectInputStream).
    Problems start when I add new objects to the already existing file (to the end of this file). Then, when I'm trying to read newly written data, I get an exception:
    java.io.StreamCorruptedException
    at java.io.ObjectInputStream.readObject0(Unknown Source)
    at java.io.ObjectInputStream.readObject(Unknown Source)
    Is there any method to avoid corrupting the stream? Maybe it is a silly problem, but I really can't cope with it! How can I write new objects to the existing file with already written objects?
    If anyone of you know something about this issue, please help!
    Jai

    Here is a piece of sample codes. You can save the bytes read from the object by invoking save(byte[] b), and load the last inserted object by invoking load.
    * Created on 2004-12-23
    package com.cpic.msgbus.monitor.util.cachequeue;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.RandomAccessFile;
    * @author elgs This is a very high performance implemention of Cache.
    public class StackCache implements Cache
        protected long             seed    = 0;
        protected RandomAccessFile raf;
        protected int              count;
        protected String           cacheDeviceName;
        protected Adapter          adapter;
        protected long             pointer = 0;
        protected File             f;
        public StackCache(String name) throws IOException
            cacheDeviceName = name;
            f = new File(Const.cacheHome + name);
            raf = new RandomAccessFile(f, "rw");
            if (raf.length() == 0)
                raf.writeLong(0L);
         * Whne the cache file is getting large in size and may there be fragments,
         * we should do a shrink.
        public synchronized void shrink() throws IOException
            int BUF = 8192;
            long pointer = getPointer();
            long size = pointer + 4;
            File temp = new File(Const.cacheHome + getCacheDeviceName() + ".shrink");
            FileInputStream in = new FileInputStream(f);
            FileOutputStream out = new FileOutputStream(temp);
            byte[] buf = new byte[BUF];
            long runs = size / BUF;
            int mode = (int) size % BUF;
            for (long l = 0; l < runs; ++l)
                in.read(buf);
                out.write(buf);
            in.read(buf, 0, mode);
            out.write(buf, 0, mode);
            out.flush();
            out.close();
            in.close();
            raf.close();
            f.delete();
            temp.renameTo(f);
            raf = new RandomAccessFile(f, "rw");
        private synchronized long getPointer() throws IOException
            long l = raf.getFilePointer();
            raf.seek(0);
            long pointer = raf.readLong();
            raf.seek(l);
            return pointer < 8 ? 4 : pointer;
         * (non-Javadoc)
         * @see com.cpic.msgbus.monitor.util.cachequeue.Cache#load()
        public synchronized byte[] load() throws IOException
            pointer = getPointer();
            if (pointer < 8)
                return null;
            raf.seek(pointer);
            int length = raf.readInt();
            pointer = pointer - length - 4;
            raf.seek(0);
            raf.writeLong(pointer);
            byte[] b = new byte[length];
            raf.seek(pointer + 4);
            raf.read(b);
            --count;
            return b;
         * (non-Javadoc)
         * @see com.cpic.msgbus.monitor.util.cachequeue.Cache#save(byte[])
        public synchronized void save(byte[] b) throws IOException
            pointer = getPointer();
            int length = b.length;
            pointer += 4;
            raf.seek(pointer);
            raf.write(b);
            raf.writeInt(length);
            pointer = raf.getFilePointer() - 4;
            raf.seek(0);
            raf.writeLong(pointer);
            ++count;
         * (non-Javadoc)
         * @see com.cpic.msgbus.monitor.util.cachequeue.Cache#getCachedObjectsCount()
        public synchronized int getCachedObjectsCount()
            return count;
         * (non-Javadoc)
         * @see com.cpic.msgbus.monitor.util.cachequeue.Cache#getCacheDeviceName()
        public String getCacheDeviceName()
            return cacheDeviceName;
    }

  • How to write data to an XML file present under application server

    frnds: can ne one tell me, how to write data in to a file, which is present under a application server
    Ex: i want to write a string data in to a file test.txt which is present under "http://localhost:8080/<some_webapp>/test.txt"
    Note:i have deploted a service<some_webapp> under Tomcat/webapps dir

    Very simple. A servlet can writes to that file if it has the good rights.
    In the servlet get (or post) method, use a code like this:
    import java.io.*;
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) {
    try {
    String filePath = this.getServletContext().getRealPath("/text.txt");//See http://java.sun.com/products/servlet/2.2/javadoc/javax/servlet/ServletContext.html#getRealPath(java.lang.String)
             PrintWriter writer = new PrintWriter (filePath);
            //or BufferedWriter out = new BufferedWriter(new FileWriter(filePath));
            writer .println("aString");
           writer.flush();
            writer .close();
        } catch (Exception e) {
           e.printStackTrace();
    }Hope That Helps

  • How to write new line to a File?

    How to write new line to a file?
    I have a string to be written to a file. the string contains "\n" in it. But why it is not showing the new line in the file.
    I have tryed FileWriter class and FileOutputStream class, but none of them works?
    any suggestion please...

    Probably using PrintStream::println() is a portable way.
    import java.io.FileOutputStream;
    import java.io.PrintStream;
    public class NewLine {
        public static void main(String[] args) {
         try {
             PrintStream ps = new PrintStream(new FileOutputStream("foo.txt"));
             ps.write("string".getBytes());
             ps.println();
             ps.close();
         } catch (java.io.IOException e) {
             e.printStackTrace();
    }Regards,

  • I have transferd music from my ipod to my new computer and some of the files are not coming over, i have noticed the m4a files come across but the mp3 do not, any ideas how i can resolve this? thanks

    I have just bought a new computer and i am transfering my music from my ipod onto my new computer, I have put the files from the music option from my ipod onto my computer. alot of the songs have come across, however there is alot of songs that havent. I have noticed that the m4a files come across but the mp3 does not. the new computer has windows 8 on it, which is very new to me. when i try and play the mp3 files, it will open them up in a different programme and will not open in itunes. does anyone know what i can do?!?!!?!?!
    THANKS

    Have you looked at the previous discussions listed on the right side of this page under the heading "More Like This"?
    BTW this is the iPod touch forum

  • HT1473 i have an ipod that was associated with a different i-tunes account. I want to sync it to me new i-tunes account but do not want to lose all of the music files already stored on the ipod. how do i do this

    i have an ipod that was associated with a different i-tunes account. I want to sync it to my new i-tunes account but do not want to lose all of the music files already stored on the ipod. how do i do this?

    Hello, peppertwist. 
    Thank you for visiting Apple Support Communities. 
    When receiving the not enough space alert, he is the best article to go through. 
    iOS: "Not enough free space" alert when trying to sync
    http://support.apple.com/kb/ts1503
    Cheers,
    Jason H. 

  • How to fix the .pdf file with error "invalid annotation object"

    how to fix the .pdf file with error "invalid annotation object"

    As long as the PDF opens, then just try saving it to a new file name. There may be a preflight script that would help troubleshoot the issue.

  • I downloaded CS6 Red Plug-In and added to Package Contents, replaced the current files with the new without backing up, now my RED footage thumbnails and color-correction don't WORK! How do I get my old importerRed file back!!?? HELP!

    I downloaded CS6 Red Plug-In and added to Package Contents, replaced the current files with the new without backing up, now my RED footage thumbnails and color-correction don't WORK! How do I get my old importerRed file back!!?? HELP!

    Try asking in the Premiere Pro  forum seems to be an Adobe Lab for Premiere Pro

  • I need to send an email where the recipient opens the PDF file with a password,   can anybody help me and show me how to do that

    Hello,  I am trying to send an email where the recipient opens the PDF file with a password,   can anybody show me how to do that

    Hi surez,
    To password protect a PDF file, you need to use Acrobat. If you don't have Acrobat, you can try it for free for 30 days. See www.adobe.com/products/acrobat.html for more information.
    In Acrobat, you choose File > Properties when the document is open, and then click the Security tab to set up a password.
    Please let us know how it goes.
    Best,
    Sara

  • Unable to save xls file from website in the "Microsoft Office Excel 97-2003 Worksheet" format. The browser is saving in unrecognized "File" Type

    The version I am using is 3.6.11
    The file is stored in the server in the format "Microsoft Office Excel 97-2003 Worksheet"
    But when I download it, it gets saved in the unrecognized format type "File"
    The servlet code written to download the file sets the content type to "application/vnd.ms-excel"
    I am able to save the file in Microsoft Office Excel 97-2003 Worksheet format using Internet Explorer Browser without any issues.
    But it does not work with the Mozilla Firefox. Any plug-in needed to make it work?

    Did you try to add the .xls file extension yourself to those files?

Maybe you are looking for

  • How to set numeric filter for JSpinner?

    Hi there, I searched the forum but can't find a solution...I'm kind of getting mad! Problem is: I have a JSpinner, I must prevent the user to insert any non-numeric value. the accepted input should be in the form <n>.<m> where n could be any integer

  • Can't open mail after installing update with 10.6.8 says my mail is out of date

    Please help - new to Macs and I installed automatic update of 10.6.8 - 4 days ago and now I can't open up mail  - it says "You can't use this version of Mail with this version of Mac OS X. You tried to open Mail version 4.5 (1084/1085) in Application

  • Multiple Selection Keywording/Labeling (Bug?)

    I recently noticed an inconsistency in behavior when selecting multiple images and applying a color label or keyword. If I am in grid view in the main window and use the lower row of images to make a sequential selection of, for example, 10 images by

  • Access violation with iisforward.dll

    I am trying to connect to weblogic through iis4.0. Have installed the iis plugin correctly. I can proxy by extension correctly but need proxying by path. When i register the isapi filter iisforward.dll, I get a access violation and the inetinfo.exe c

  • Stop Xerces to resolve Entities

    Hi, 1) Question: ============ I've got the following problem. In one of my swing-projects i need the possiblity to edit XML-Code. Now when reading in the XML-File Xerces expands ENTITITES like & and in my Swing-App only & is shown. I have not found a