Read and Display an Excel Sheet

Hello LabVIEW community.  I am going through a bumnch of ActiveX subVIs trying to figure out how to do something very simple.  All I want to do is read an entire Excel Sheet and display it in an array.  Single Page.  Any help would be hot.
Remember, code does exactly what you tell it.
Solved!
Go to Solution.

camerond wrote:
DailyDose wrote:
Is it possible to program this example to simply read all the columns and rows until it comes across like maybe 3 repetitive empty cells instead of having to specify which which row/column to end at?
Sure. Give it a shot and let us know how you solved it.
Cameron
You're right!  It was possible.  Use For loops and check to see when empty cells begin to repeat.  I named it GetXL_CellValues_2D_String_All.vi
I made mine though very dependent on my excel sheet.  It's easy to make it excel sheet independent.
Remember, code does exactly what you tell it.
Attachments:
read_excel_values.llb ‏267 KB

Similar Messages

  • How to read the data in excel sheet

    Dear sir,
    How to read the data in excel sheet when i recieve a data serial communication... ie i have store a data in excel such that
    Cell A       Cell B
       A           Apple 
       B           Ball
       C           Cat
       D           Doll
    when i recieve A from serial communication i have to display Apple, and when i recieve B i have to display Ball and so on.. 

    Hi, 
    I would recommend you to have a look at the VI attached. It makes use of a VI named 'Read from Spreadsheet' to read the row and column data from the tab delimited excel file. The read data is then searched for the Alphabet specified and finally returns you the corresponding string. The test file used to validate the operation of the VI is also attached. 
    Trust this would help you solve the issue. 
    Regards, 
    Sagar G Yadav | Application Engineer | National Instruments
    Attachments:
    read_from_excel.vi ‏10 KB
    Book1.txt ‏1 KB

  • Graph to be displayed in Excel Sheet

    Hi,
    The requirement is : We need to display a Line-Graph in the Excel Sheet.
    I referred the [sdn |Excel Charts in ABAP;:
    But, the Demo Programs SAPRDEMOEXCELINTEGRATION & SAPRDEMOEXCELINTEGRATION2 display a Default Graph and not with our Values.
    Can anyone suggest me how to achieve this? Custom Graph (for example from our own Internal Table Values) to be displayed in Excel Sheet.
    Thanks in advance.
    Thanks & Regards,
    Sowmya

    Hi,
    Can you please try using the following code
    CREATE OBJECT h_excel 'EXCEL.APPLICATION'.
    *Sheet1
    CALL METHOD OF h_excel 'Workbooks' = h_mapl.
    SET PROPERTY OF h_excel 'Visible' = 1.
    CALL METHOD OF h_mapl 'Add' = h_map.
    gets the current worksheet
    GET PROPERTY OF h_excel 'activesheet' = worksheet.
    sets the name of the worksheet
    SET PROPERTY OF worksheet 'Name' = 'sheetnew'.
    pass data to sheet
    CALL METHOD OF worksheet 'Cells' = gs_cell1
    EXPORTING
    #1 = 1 " starting row of selection
    #2 = 1. " starting column of selection
    CALL METHOD OF worksheet 'Cells' = gs_cell2
    EXPORTING
    #1 = 1 " ending row of selection
    #2 = 1. " ending column of selection
    CALL METHOD OF worksheet 'Range' = range
    EXPORTING
    #1 = gs_cell1
    #2 = gs_cell2.
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>CLIPBOARD_EXPORT
    IMPORTING
    DATA = GT_OUTPUT[]
    CHANGING
    RC = L_RC.
    CALL METHOD OF RANGE 'Select'.
    CALL METHOD OF WORKSHEET 'Paste'.
    create a chart sheet
    CALL METHOD OF h_excel 'charts' = h_chart.
    add a chart of variable h_chart1
    opens the initially created sheet
    CALL METHOD OF worksheet 'Select'.
    CALL METHOD OF h_excel 'Cells' = gs_cell1
    EXPORTING
    #1 = 1 " starting row of selection
    #2 = 1. " starting column of selection
    CALL METHOD OF h_excel 'Cells' = gs_cell2
    EXPORTING
    #1 = 4 " ending row of selection
    #2 = 2. " ending column of selection
    combine cells to form the range
    CALL METHOD OF h_excel 'Range' = range
    EXPORTING
    #1 = gs_cell1
    #2 = gs_cell2.
    sets the chart type
    CALL METHOD OF h_excel 'charts' = h_chart2.
    call method of h_chart2 'add' = h_chart3.
    SET PROPERTY OF h_chart3 'charttype' = '69'.
    title for chart
    SET PROPERTY OF h_chart3 'HasTitle' = 1.
    GET PROPERTY OF h_chart3 'ChartTitle' = ch_title.
    GET PROPERTY OF ch_title 'Characters' = ch_title.
    SET PROPERTY OF ch_title 'text' = 'inventory comparison'.
    CALL METHOD OF h_chart3 'SetSourceData'
    EXPORTING #1 = range " range to be passed to the chart
    #2 = 2. " selcts row/column
    CALL METHOD OF h_chart3 'ApplyDataLabels'
    exporting
    #1 = '5'.
    selects worksheet
    CALL METHOD OF worksheet 'Select'.
    CALL METHOD OF h_excel 'Cells' = gs_cell1
    EXPORTING
    #1 = 1 " starting row of selection
    #2 = 1. " starting column of selection
    CALL METHOD OF h_excel 'Cells' = gs_cell2
    EXPORTING
    #1 = 1 " ending row of selection
    #2 = 2. " ending column of selection
    CALL METHOD OF h_excel 'Range' = range
    EXPORTING
    #1 = gs_cell1
    #2 = gs_cell2.
    sets the bold for the header
    GET PROPERTY OF range 'Font' = GS_FONT .
    SET PROPERTY OF GS_FONT 'Bold' = 1 .
    free object h_excelor
    or
    CALL FUNCTION 'GRAPH_MATRIX_3D'

  • Comparing and Combining 2 Excel Sheets

    Hi there,
    I have Microsoft Office 2008 (also Office 2007 on Windows - Using Parallel). Is there a software out there for Mac or PC where I can compare and combine two excel sheets? Each excel sheet has at least 12,000 rows. One column on each spreadsheet has a unique header.
    Anything that would be compatible with Leopard or XP that anyone would recommend.
    Thanks!
    Gilbert

    Apple Discussions doesn't have support for third-party products. Excel is a Microsoft product. You would be better off posting this question in the Excel for Mac forums at Microsoft. You can find them via Mactopia.

  • How to read and display a signal from my a miccrontroller (MCB1700) onto labview connected via a CAN port on a PXI machine

    How do you read and display a signal from my a miccrontroller (MCB1700) onto labview connected via a CAN port on a PXI machine?
    I tried using a DAQ Assistant but the CAN port is not included as one of the supported physical channels even though all its drivers are upto date.
    Please help..
    Thanks.
    Solved!
    Go to Solution.

    Attached herewith is a print screen of what is showing on MAX
    The CAN ports are on NI PXI-8461
    Hopefully that clarrifies something.
    Attachments:
    Untitled.png ‏212 KB
    Untitled.png ‏212 KB

  • How to read and display a signal from my PIC Microcontr​oller onto Labview?

    Hi,
    I am doing a project on a Pulse Oximeter and i am trying to read and display the signal from my PIC Microcontroller on Labview? How do i go about doing it? I am using the PIC16F877 and also making use of the USART?
    How do i implement and initialise the USART in PIC16? What are the steps to be taken, please guide me through the process? The link provides information regarding the USART connection, initialisting and stuff? Is it correct to use these codes in my program?Link: http://ww1.microchip.com/downloads/en/AppNotes/007​74a.pdf
    Also, i am using the RS232 serial interface to connect to the PC? The connector i am using is the DB9 Connector. Which template and VI can i use? Am i supposed to use the NI-DAQmx and VISA? Also, for my USART connection, i am using the MAX232 Driver which is applicable for my application as i am working with +5V. So far, i have been reading and trying out on Labview and the steps i have taken are:
    1) Open a New VI and used the Instrument I/O(Read & Display) template?
    2) How do i configure the Instrument I/O Assistant Express VI to read the info from my device connected to COM1?
    3) I was reading the Labview Manual, 'Getting Started with Labview' and i was following the steps under Page 55, Communicating with an Instrument. Am i on the right track?
    4) How do i check and make sure that the port settings of the I/O Assistant and my PIC Micro Match
    Please help me out and guide me through the process. I am student at a polytechnic and i am very new to Labview and the software is used as a development tool for the project. I have a deadline to meet and i hope i can get a response as fast as possible. Your help will be kindly and greatly appreciated. I hope to hear from you guys soon.You can e-mail me all your answers at [email protected]
    Thank You
    Best regards,
    Ashwin
    Ashwin Kumar Mansukhani
    Attachments:
    Getting Started with Labview.pdf ‏901 KB

    Hi Ashwin,
    It is a good idea to first be able to communicate with the microcontroller using some sort of serial communication software such as "HyperTerminal" or "Procomm", etc. Refer to MicroChip's recommendations on this.
    Once that works, then you are ready to use LabView.
    Here is a link which covers many aspects of serial communication. Link - click here
    You probably received a development kit. They usually have a readily available interface. It's been a long time since I played with the PIC, but I seem to remember that you need to program the serial communication driver (as well as at least a bootloader) to get the serial communication going. The driver contains the necessary protocols so that you PC can have a machine conversation with the target (PIC).
    It sounds like a fun & interesting project. Please avoid to have replies to your personal email. By having the answers posted to this thread, you will get much more support and advice.
    Have fun,
    JLV

  • How to read and display a signal from my PIC Microcontroller onto Labview

    Hi,
    I am doing a project on a Pulse Oximeter and i am trying to read and display the signal from my PIC Microcontroller on Labview? How do i go about doing it? I am using the PIC16F877 and also making use of the USART?
    How do i implement and initialise the USART in PIC16? What are the steps to be taken, please guide me through the process? The link provides information regarding the USART connection, initialisting and stuff? Is it correct to use these codes in my program?Link: http://ww1.microchip.com/downloads/en/AppNotes/00774a.pdf
    Also, i am using the RS232 serial interface to connect to the PC? The connector i am using is the DB9 Connector. Which template and VI can i use? Am i supposed to use the NI-DAQmx and VISA? Also, for my USART connection, i am using the MAX232 Driver which is applicable for my application as i am working with +5V. So far, i have been reading and trying out on Labview and the steps i have taken are:
    1) Open a New VI and used the Instrument I/O(Read & Display) template?
    2) How do i configure the Instrument I/O Assistant Express VI to read the info from my device connected to COM1?
    3) I was reading the Labview Manual, 'Getting Started with Labview' and i was following the steps under Page 55, Communicating with an Instrument. Am i on the right track?
    4) How do i check and make sure that the port settings of the I/O Assistant and my PIC Micro Match
    Please help me out and guide me through the process. I am student at a polytechnic and i am very new to Labview and the software is used as a development tool for the project. I have a deadline to meet and i hope i can get a response as fast as possible. Your help will be kindly and greatly appreciated. I hope to hear from you guys soon.You can e-mail me all your answers at [email protected]
    Thank You
    Best regards,
    Ashwin
    Ashwin Kumar Mansukhani
    Attachments:
    Getting Started with Labview.pdf ‏901 KB

    Hi Ashwin,
    I am not familiar with the PIC Microcontrollers, but I am assuming you mean that you have the microcontroller sending out serial data that you want to read on another computer with LabVIEW. Please let me know if this is incorrect.
    What type of data is coming out of the serial port? Is it ASCII, or binary? The reason I ask this is that the serial communication in LabVIEW is done through a protocol called VISA, which uses ASCII data to send and receive. You can later convert this data into whatever form you need, but this is what it is designed to read and write.
    You can check the settings such as baud rate and data bits in a configuration utility called Measurement and Automation Explorer, or MAX. When you open up the MAX interface, you can expand the Devices and Interfaces entry on the left, and then expand the Ports entry to see your serial port. When you highlight this port, select the Port Settings tab at the bottom of the window, and you can see what the current settings are, and change them if you need to. You can also set these parameters in LabVIEW using the VISA Configure Serial Port VI.
    You can also test communication in MAX by right clicking on the correct port and choosing Open VISA Session. Then choose the Basic I/O light blue tab, and then go to the Read tab. When you click execute, it should read in what is coming from the serial port. This will allow you to verify that the correct information is coming in before even trying to acquire the data in the LabVIEW environment.
    In LabVIEW, the best resource to use the Basic Serial Write and Read example program that ships with LabVIEW. By examining the block diagram of this program, you will be able to see the basic programming flow of serial communication in LabVIEW.
    I hope this information was helpful! Please let us know if there's anything else we can help with.
    john
    Applications Engineer

  • Reading and displaying Ms.Word document with web dynpro java

    Hi,
    I'm using NetWever developer studio 7..0.21.
    I'm developing web dynpro java application.I'm in difficulty to read and display word document with its original format in web dynpro view. Is it possible?
    If possible , is there a blog etc.?
    Thanks.

    Hello,
    You have to use the Office Integration Library. Please, follow the documentation below:
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/32853febec3c17e10000000a114084/frameset.htm
    I hope this helps you.
    Regards,
    Blanca

  • Does Aperture read and display XMP data generated by LR?

    Does anyone know if Aperture reads and displays XMP data generated by LR? I am not interested particularly in keywords.

    Thanks for the quick reply, William.
    I would suggest to David Schloss and AUPN that this would be a feature worth supporting. Although, hopefully both new software and improving skills in using them make me less concerned about preserving a static conversion or interpretation of an image, I think that whatever software we use to read/exchange keywords and other IPTC data is a constant.

  • Read and display the content of a MS Word document

    Hi all,
    Can any body help me out in reading and displaying the content of a document(Microsoft word) and text file using java .
    thanks in advance.

    Yeah, there's apache's POI and a couple of other free libraries around.
    I just googled "java word document", and second from the top was:
    Java libraries to read and write Word DOC files
    http://schmidt.devlib.org/java/libraries-word.html

  • Problems while reading and displaying .pdf-Documents from Bfile

    Hi
    I want to read and display .pdf-Documents in Adobe-Reader that are stored as BFile. While displaying the Document Adobe Reader is showing several Errors like " ..less Picture-Data read than expected.. ". Is this a Buffer-Problem? or whatelse ??
    Thanks for help
    null

    PrintStream wr = new PrintStream(socket.getOutputStream());
    wr.close();I suspect this is the problem. You could try socket.shutdownOutput() - or you could just leave the streams alone and let socket.close() shut things down.
    Grant

  • How to read all outline member and dimension names and display in excel

    Hi All,
    I am developing a custom excel application (VBA) and i need to display member names of a one essbase database of one application and display those members in excel sheet.
    Is there any specific API which does that thing.
    Thanks

    Combo boxes -- if those are truly your controls of choice, you are going to (I am guessing at least) only going to be looking at small and simple dimensions -- otherwise it isn't going to be very good at navigating a large dimension.
    You actually have a pretty fun process ahead of you -- writing code to get levels, relationships, etc.
    Just a note of caution -- if you have really big dimensions and are trying to get this into a treeview, you might have to come up with some sort of paging approach as you'll overwhelm Excel VBA.
    You may also want to go pure API for a lot of the dimension stuff.
    Have you checked out AppliedOLAP's Dodeca? It can read Excel worksheets, has dimension handling built in, and oh, about 1,000 other cool things including scripting, easy access to the API, etc., etc., etc. No, I don't work for them, nor do I get a commission, but it is an awesome tool in every respect. I have used AppliedOLAP's products in the past and they (the products and the company) are awesome (used twice in a paragraph, but it is that cool).
    Regards,
    Cameron Lackpour

  • Getting short dumps while reading bulky data from excel sheet

    Hi all,
    We have converted our non-unicode based sap system (R/3 4.7, Windows 2003,
    SQL 2000) into a unicode based system recently. We are facing two peculiar
    problems for last few days.
    *Problem 1 - *Whenever we want to upload the data from excel sheet, the
    system throws a dump after reading about 400 entries, while last week the
    same system used to read about 8000 entries in a single go.
    *Problem 2 - *Also, whenever we realease a transport requst from development
    containing a lot of changes, the request will reach the quality system but
    without the changes. but if i ll try to import the changes into quality
    system after generating more than one request containing small small
    changes, they get reflected in QAS immediately. Is there any size
    constraint in transporting a request fro DEV->QAS->PRD.
    Please suggest some ways.
    I am pasting the dump (that I am getting while data uploading from Excel).
    ~~~~~~~~~~~~~~~~~~
    Runtime errors
    MESSAGE_TYPE_X*
    Occurred on
    22.02.2008 at
    13:21:02*
    The current application triggered a termination with a short dump.
    What happened?
    The current application program detected a situation which really
    should not occur. Therefore, a termination with a short dump was
    triggered on purpose by the key word MESSAGE (type X).
    What can you do?
    Print out the error message (using the "Print" function)
    and make a note of the actions and input that caused the
    error.
    To resolve the problem, contact your SAP system administrator.
    You can use transaction ST22 (ABAP Dump Analysis) to view and administer
    termination messages, especially those beyond their normal deletion
    date.
    Error analysis
    Short text of error message:
    Control Framework : Error processing control
    Technical information about the message:
    Diagnosis
    An error occurred when the system tried to process the commands
    from the Automation Queue on the presentation server.
    There are several possible reasons for this:
    - The installation of the SAP GUI on the presentation server is
    faulty or obsolete.
    - There is an error in the application program
    - There is an error in the SAPGUI or an integrated control
    Procedure
    1. Make sure that you have imported the appropriate Support
    Package, the current kernel, and GUI patch for the release of your
    System
    2. Check whether the error occurs locally on one or a few PCs, or
    generally on all PCs. Note whether the error only occurs for some
    users, for example because of a specific Customizing setting.
    If it only occurs locally, this suggests an installation problem
    with the PC. Check the installation; if necessary, reinstall the
    software. In the dump, search for the SY-MSGLI field, since it may
    point to the cause of the error.
    3. Activate the Automation Trace (in accordance with SAP Note
    158985).
    4.Start the transaction and continue until the screen immediately
    before the dump.
    5. From the System -> Utilities menu, choose Autom. Queue,
    Synchronous Processing.
    The status bar of the GUI displays the text:
    "Automation synchron flush mode on"
    6. If you now proceed with the application, the short dump will
    display the ABAP call that caused the error; the Automation Trace
    will contain the error on the presentation server.
    7. If necessary, load the short dump and trace files on to
    sapservX, so that SAP can analyze them.
    Message classe...... "CNDP"
    Number.............. 006
    Variable 1.......... " "
    Variable 2.......... " "
    Variable 3.......... " "
    Variable 4.......... " "
    Variable 3.......... " "
    Variable 4.......... " "
    How to correct the error
    Probably the only way to eliminate the error is to correct the program.
    You may able to find an interim solution to the problem
    in the SAP note system. If you have access to the note system yourself,
    use the following search criteria:
    "MESSAGE_TYPE_X" C
    "SAPLOLEA" or "LOLEAU02"
    "AC_SYSTEM_FLUSH"
    If you cannot solve the problem yourself, please send the
    following documents to SAP:
    1. A hard copy print describing the problem.
    To obtain this, select the "Print" function on the current screen.
    2. A suitable hardcopy prinout of the system log.
    To obtain this, call the system log with Transaction SM21
    and select the "Print" function to print out the relevant
    part.
    3. If the programs are your own programs or modified SAP programs,
    supply the source code.
    To do this, you can either use the "PRINT" command in the editor or
    print the programs using the report RSINCL00.
    4. Details regarding the conditions under which the error occurred
    or which actions and input led to the error.
    System environment
    SAP Release.............. "620"
    Application server....... "nhbho930"
    Network address.......... "192.168.0.30"
    Operating system......... "Windows NT"
    Release.................. "5.2"
    Hardware type............ "4x Intel 801586"
    Character length......... 16 Bits
    Pointer length........... 32 Bits
    Work process number...... 0
    Short dump setting....... "full"
    Database server.......... "NHBHO930"
    Database type............ "MSSQL"
    Database name............ "DEV"
    Database owner........... "dev"
    Character set............ "C"
    SAP kernel............... "640"
    Created on............... "Aug 17 2007 00:18:58"
    Created in............... "NT 5.0 2195 Service Pack 4 x86 MS VC++ 13.10"
    Database version......... "SQL_Server_8.00 "
    Patch level.............. "196"
    Patch text............... " "
    Supported environment....
    Database................. "MSSQL 7.00.699 or higher, MSSQL 8.00.194"
    SAP database version..... "640"
    Operating system......... "Windows NT 5.0, Windows NT 5.1, Windows NT 5.2,
    Windows NT 6.0"
    User, transaction...
    Client.............. 300
    User................ "NHBABAP"
    Language key........ "E"
    Transaction......... "SE38 "
    Program............. "SAPLOLEA"
    Screen.............. "SAPMSDYP 0010"
    Screen line......... 0
    Information on where terminated
    The termination occurred in the ABAP program "SAPLOLEA" in
    "AC_SYSTEM_FLUSH".
    The main program was "ZBDC_CONTRACT ".
    The termination occurred in line 29 of the source code of the (Include)
    program "LOLEAU02"
    of the source code of program "LOLEAU02" (when calling the editor 290).
    ~~~~~~~~~~~~~~~~~~~~~
    Thank you all.
    Cheers.
    Mitra __.____._

    for the 50 millionth time: Excel spreadsheets are NOT databases, you should NOT try to use them as such and NEVER access them using JDBC.
    You should also under NO condition use the JDBC-ODBC bridge driver (that was actually the 78 millionth time that was told someone).

  • Script to read data in specific excel sheet

    I was wondering whether it was possible to read the data in a specific sheet of a workbook in excel?
    I already have one working for reading the file, but was hoping to be able a specific sheet in that file.
    With this, is it possible to read the names of the sheets and select the one that you want
    Hope you can help

    This should illustrate one way of getting data from different sheets:
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px;
    color: #000000;
    background-color: #FFDDFF;
    overflow: auto;">
    tell application "Microsoft Excel"
    set loopMax to count of worksheets of workbook 1
    repeat with sheetNumber from 1 to loopMax
    display dialog (value of cell 1 of column 1 of worksheet sheetNumber of workbook 1) as string
    end repeat
    end tell </pre>
    So what I am doing is referencing the sheet by number: e.g. "worksheet 1 of workbook 1" but there are other references you can use such as its name.

  • Displaying an excel sheet in iframe

    hai all,
         I need the step by step process to display excel sheet in iframe UI element.
    I have the excel sheet stored in database as text object.All i need to do is get the excel sheet displayed in iframe on click of a button.
    Plz help me with codings and steps involved for this.
    Thanks n Regards
    Sharanya.R

    Hi sharnya,
    Refer
    Re: Read excel in webdynpro without using odbc (points awarded!)
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/edc2f3c2-0401-0010-8898-acd5b6a94353
    Regards,
    P.Manivannan

Maybe you are looking for

  • Need to create maintenance view for a custom infotype

    A custom infotype 90XX is created. The data cannot be modified or created through PA30 in this infotype. Through PA 40 actions only we can create/change the record/data. We have created some 1000 records in it. Now can we create a maintenance view fo

  • Problem with Pages update

    Has anyone had a problem opening pages documents and it telling you that you need to update to the new pages but you already have? 

  • Burning Audiobooks in iTunes

    I've run into problems several times in burning multiple disk audiobooks, where iTunes will burn the first 8 out 9 disks fine, then quit as if done. I can go back and burn the last disk manually, but does anyone know why this is happening?

  • FCP to QT shimmers

    Posted this as an iDVD problem but narrowed it to this: When I try to save a FCP file to Quicktime, it comes out with shimmering noise in high contrast areas, one scene has chairs that seem to move back and forth within the image. Tried Streamclip fr

  • Function module in background task

    Hi, I have a user-exit, that must modify a value. But this value  have a lock entry (it's my own transaction that set this lock-entry). So I would like to call a function in background task to modify the value when the lock entry disapear. But ... I