Read XLS data

I don't want to be one of those guys that ask questions that have been answered dozens of times (especially about excel) but I have a quick question.
The end goal is open an xls file, do some stuff, then save as csv. Pretty simple, and most of the code is done.
I found some code (Smercurio_fc, 2010) that does nearly exactly what I am looking for.
The one thing I would like to modify is the fact that it makes you select a range.
I would like to load all of the data in, rather than a subset of the data.
How could I modify the code such that I can remove the range function without breaking the rest of the code?
Thanks in advance!
Cory K
Solved!
Go to Solution.
Attachments:
XLS to CSV.vi ‏18 KB

Try this.
Be aware that I saved this with the Index on the Array indicator set for some far out values.  Might look like it didn't do anything at first glance.
Attachments:
xls_all2csv.vi ‏14 KB

Similar Messages

  • How to read .xls file from FTP server t oInternal table

    Hi
    am using the FTP_SERVER_TO_R3 to read xls file from FTP server to internal table
    but the data i get in LT_TEXT is special characters.
    CALL FUNCTION 'FTP_SERVER_TO_R3'
    EXPORTING
    handle = hdl
    fname = f_name "ProdDataFromCRM.xls.
    * CHARACTER_MODE = 'X'
    * IMPORTING
    * BLOB_LENGTH =
    TABLES
    BLOB = lt_text
    * TEXT = lt_text
    EXCEPTIONS
    TCPIP_ERROR = 1
    COMMAND_ERROR = 2
    DATA_ERROR = 3
    OTHERS = 4
    can any one help me out to get the exact data..
    Really appreciate your quick response..
    Thank You

    Hi, if you really retrieve an excel file, you can not see the data in ABAP. You may see them in Excel. For this you may use
    CALL METHOD document->open_document_from_table
    of the interface i_oi_document_proxy for OLE objects. You can access the data with reference to the interface i_oi_spreadsheet.
    Please check [Desktop Office Integration (BC-CI)|http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCCIOFFI/BCCIOFFI.pdf] for details.
    But, who knows, perhaps you want "And Now For Something Completely Different".
    Regards
    Clemens

  • Database "read all data.vi" not able to read row contents

    Good day,
    I'm trying to read a table from an Excel Database, with the NI VI "Read all data.vi" provided as an example VI.  The VI is slighlty modified to have the file dialog box wired to the open connection VI.  This file dialog provides the connection information to the Excel database.   So far only the column names are showing, but not any row content, as you can see in the screenshot - front_panel.
    What the VI does :
    - finds the table name(s)
    - finds the column name(s)
    Problem with the system:
    - can't read row data.
    The Excel file in question is really really simple.
    here is the content of the dsn file:
    [ODBC]
    DRIVER=Microsoft Excel Driver (*.xls)
    UID=admin
    UserCommitSync=Yes
    Threads=3
    SafeTransactions=0
    ReadOnly=0
    PageTimeout=5
    MaxScanRows=8
    MaxBufferSize=2048
    FIL=excel 8.0
    DriverId=790
    DefaultDir=C:\MPBC\My Database
    DBQ=C:\MPBC\My Database\SIMPLEST.xls
    Any hints on how to get row data?
    Thanks in advance.
    ---info---------
    LabVIEW 8.6
    Excel 9.0  or 2000
    Win XP pro SP3
    FB
     

    Well, as I said, I can't help with treating Excel as a DataBase, but here is some code to read your Excel file.  I actually read it twice, the first time returning all of the data in a single array (you can split it yourself into Header and Data), and the second time I read in a single row into Header (the Read returns a 2D array, which I turn into 1D) and a second Read for the rest of the data.  To read the rest, I first figure out the "next" row (one past the last row, so I decrement it to get the last row) and specify all the columns).  The 100 msec time delay between Excel Reads is to give Excel a chance to "cool down" (trust me, without the Delay, Excel will throw an Error).  Note that this is a Snippet -- you can drag it into a LabVIEW 2014 Block Diagram and it will become LabVIEW code.
    Hmm -- I just noticed that you seem to be using LabVIEW 8.6, more than 5 years old.  I don't know if this version of the RGT is available in that older version.
    Bob Schor

  • I have a VI and an attched .txt data file. Now I want to read the data from the .txt file and display it as an array in the front panel. But the result is not right. Any help?

    I have a VI and an attched .txt data file. Now I want to read the data from the .txt file and display it as an array in the front panel. But the result is not right. Any help?
    Attachments:
    try2.txt ‏2 KB
    read_array.vi ‏21 KB

    The problem is in the delimiters in your text file. By default, Read From Spreadsheet File.vi expects a tab delimited file. You can specify a delimiter (like a space), but Read From Spreadsheet File.vi has a problem with repeated delimiters: if you specify a single space as a delimiter and Read From Spreadsheet File.vi finds two spaces back-to-back, it stops reading that line. Your file (as I got it from your earlier post) is delimited by 4 spaces.
    Here are some of your choices to fix your problem.
    1. Change the source file to a tab delimited file. Your VI will then run as is.
    2. Change the source file to be delimited by a single space (rather than 4), then wire a string constant containing one space to the delimiter input of Read From Spreadsheet File.vi.
    3. Wire a string constant containing 4 spaces to the delimiter input of Read From Spreadsheet File.vi. Then your text file will run as is.
    Depending on where your text file comes from (see more comments below), I'd vote for choice 1: a tab delimited text file. It's the most common text output of spreadsheet programs.
    Comments for choices 1 and 2: Where does the text file come from? Is it automatically generated or manually generated? Will it be generated multiple times or just once? If it's manually generated or generated just once, you can use any text editor to change 4 spaces to a tab or to a single space. Note: if you want to change it to a tab delimited file, you can't enter a tab directly into a box in the search & replace dialog of many programs like notepad, but you can do a cut and paste. Before you start your search and replace (just in the text window of the editor), press tab. A tab character will be entered. Press Shift-LeftArrow (not Backspace) to highlight the tab character. Press Ctrl-X to cut the tab character. Start your search and replace (Ctrl-H in notepad in Windows 2000). Click into the Find What box. Enter four spaces. Click into the Replace With box. Press Ctrl-V to paste the tab character. And another thing: older versions of notepad don't have search and replace. Use any editor or word processor that does.

  • PI 7.3 - AEX "unable to read configuration data" and login problems

    Hello Friends,
    after installation of AEX, i'm facing some problems.
    1.I'm not able to login with any user, i created during installation wizard. So i cannot check any user in NWA -> User Administration.
    2.Once more, while opening http://<host>:<port>/rep or http://<host>:<port>/dir, i get the following error message.
    Can somebody help me?
    I think, there is a problem with the users, which have been created during installation. How can i check this? Is there any chance?
    Second, if i'm able to login, i have to import the exchange profile again. This should solve the problem. Or is this wrong?
    PI (http://<host>:<port>/dir/start/index.jsp). Below is the part of the error message that is showing up. Appreciate your suggestions:
    Exception class: com.sap.aii.utilxi.prop.api.PropertiesException$InitFailed
    Message
    Unable to read configuration data (ExchangeProfile/aii.properties)
    Stacktrace
    Thrown:
    com.sap.aii.utilxi.prop.api.PropertiesException$InitFailed: Unable to read configuration data (ExchangeProfile/aii.properties)
    at com.sap.aii.utilxi.prop.api.PropertySourceFactory.initServerMode(PropertySourceFactory.java:220)
    at com.sap.aii.utilxi.prop.api.AIIProperties.initServerMode(AIIProperties.java:518)
    at com.sap.aii.ib.server.applcomp.StartupServerProperties.initPropertiesForServer(StartupServerProperties.java:97)
    at com.sap.aii.ibdir.server.applcomp.StartupCodeEntry.startup(StartupCodeEntry.java:151)
    at com.sap.aii.ib.core.applcomp.IStartupCodeEntry.startupIfNotAlreadyDone(IStartupCodeEntry.java:43)
    at com.sap.aii.ib.core.applcomp.ExplicitApplicationComponentImpl.startup(ExplicitApplicationComponentImpl.java:116)
    at com.sap.aii.ib.core.applcomp.ExplicitApplicationComponents.startup(ExplicitApplicationComponents.java:438)
    at com.sap.aii.ib.core.applcomp.ApplicationComponent.startup(ApplicationComponent.java:203)
    Please let me know if I am not clear.
    Edited by: Clarence on Feb 6, 2012 3:28 PM
    Edited by: Clarence on Feb 6, 2012 3:28 PM

    hi,
    >>>>Second, if i'm able to login, i have to import the exchange profile again. This should solve the problem. Or is this wrong?
    if you have java stack only there is no exchange profile anymore...
    https://weblogs.sdn.sap.com/pub/wlg/28334
    Regards,
    Michal Krawczyk

  • FCP error message: Unable to read the data on your source tape!

    Hey,
    So I have been editing on the MacPro now for over a year and I have never seen this message before...the message reads:
    _*"Capture encountered a problem reading the data on your source tape. This could be due to a problem with the tape."*_
    Has anyone got this message and could help me out please? I need to edit these tapes A.S.A.P.
    Thank You,
    Erick

    why would it start a month later giving me problems instead of when it was updated?
    That is a good point. Anything change since the time it worked to when it didn't? How about trying another firewire cable. Those can go south without notice, might cause this.
    Shane

  • Problem in Read Master Data rule type in Transformation

    Hi,
    I have 'Tax Classification' & 'Sales Territory' as attributes for 0customer (Master data).  I loaded master data for 0customer & data have come up for this 2 fields.  I want this 2 fields in my DSO with data filled.  As this 2 fields are not in Transaction datasource of my DSO,  i added this 2 fields in the Target side in Transformation of the DSO.  In Transformation, I gave the rule type as 'Read Master Data'  from attribute of '0customer' & mapped KUNAG (Sold-to) to this 2 fields.  Activated the Transformation & executed the DTP.
    When i check the data, i could see that the Infoobject 'Sales Territory' column alone is filled but 'Tax Classification' column is blank.  Tax classification has data in 0customer master data for the displayed customer values but still data is not coming in DSO.
    How does this happen when both the fields have same mapping & rule type and still data not getting populated for one field alone.  Am i missing anything?
    Regards,
    Murali

    hi,
    the green request in MD does not means that the data in MD is activated, you need to activate it after loading everytime so that it reflects in where used list as well.
    regards,
    Arvind.

  • 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

  • Read Master Data for Process order status change (REL to CRTD)

    I am unable to read master data and thus change the status of process order from REL to CRTD. (COR2)
    The reason it says, error in BOM reading, Transport Requirement (TR) already generated.
    Even after deleting the TR (LB02), the issue still exists.
    Is there another way of changing the status or some more steps are needed for the TR deletion?
    Thnx!
    Abhi.

    Order header Status-
    REL  Released
    MSPT Material shortage
    PRT  Printed
    PRC  Pre-costed
    BASC Batch assignment complete
    BCRQ Order to be handled in batches
    SETC Settlement rule create.
    In the error log it gives-
    Diagnosis
    Transfer requirements have already been generated, so therefore the bill of material cannot be read.
    System Response
    The system does not execute the action.
    Then I deleted the TR (LB02), but still I cannot reread the master data.
    The MSPT was for only 2 materials out of 6 and there is no GMPS status.
    There is prod supply area and control cycle used.
    and the TR generated at order release.

  • How do I change the default from"Mark message as read by date" to "Mark message as read"?

    When I migrated from Windows XP to Windows 7 I downloaded & installed a new version of Thunderbird (v4.10.2) and retrieved my Mail files to the new profile. Everything seems to be working properly except that whenever I close an open message I get the "Mark messages as read by date" popup which has the current date but wants me to specify a starting date. This didn't happen in my previous installations (I've used Thunderbird for years). Options / Advanced / Reading & Display has "Automatically mark messages as read" checked and "Immediately on display" set, but I haven't found anything that lets me choose "Mark as read" rather than "Mark as read by date". How do I turn the "by date" off?
    Thanks --

    'Mark Message as read by Date'
    This can be invoked by right click on email in list and select 'Mark' > 'As read by date' to invoke the 'Mark Message as read by Date' pop up window.
    If you are reading an email in either the Message Pane or in a new tab and press the 'C' key, this will open the 'Mark Message as read by Date' pop up window.
    So can you tell us exactly how you are ''closing'' a previously unread message.
    Do you select an email in the list so that it displays in the Message Pane? Then you do not need to close it because this will auto happen when you select another email in the list.
    OR do you double click to open an email in a tab. Then how do you close it? There are some options on how to do this:
    # Do you click on the small 'x' located in the tab?
    # do you use 'Ctrl'+'W' ?
    # Do you right click on tab to show drop down options and then press 'C' key?
    I notice that there is a similar action - pressing of 'C' key.
    If you do not right click to get drop down, but instead just use 'C' key, you will invoke the 'Mark Message as read by Date' window.
    Can you check what it is you are doing

  • How to read a data from USB port using JAVA

    hi all,
    i need to know how to read a data from USB port using java. any API are available for java ?.........please give your valuable ideas !!!!!!!!!
    Advance Thanks!!

    You can do this. Please use this link
    [http://www.google.co.in/search?hl=en&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&hs=uHu&q=java+read+data+from+usb+port&btnG=Search&meta=&aq=f&oq=]
    What research did you do of your own? Have you done some testing application and tried yourself??

  • How to read the data from Excel file and Store in XML file using java

    Hi All,
    I got a problem with Excel file.
    My problem is how to read the data from Excel file and Store in XML file using java excel api.
    For getting the data from Excel file what are all the steps i need to follow to get the correct result.
    Any body can send me the code (with java code ,Excel sheet) to this mail id : [email protected]
    Thanks & Regards,
    Sreenu,
    [email protected],
    india,

    If you want someone to do your work, please have the courtesy to provide payment.
    http://www.rentacoder.com

  • ITunes cannot read the data on my iPod touch

    Just three weeks or so ago, I was able to use iTunes without any problems to put a few songs on my iPod Touch 2nd Gen. Recently, however, whenever I try to connect my iPod to iTunes via USB, I get an error message that says something along the lines of: "iTunes cannot read the data on xxx's iPod Touch. Go to the Summary tab and choose Restore to restore this iPod to it's original factory settings.". I don't know why it says this since my iPod is functioning normally. My iPod shows up on the left hand side of the iTunes window as "iPod" instead of "xxx's iPod Touch" like it used to. The only options I have are Check for Update (disabled) and Restore. Is there any way to fix this without restoring my iPod? And if I have to restore, can I do so without losing (or having to re-transfer) any of my data that hasn't been or can't be backed up? Please help and thanks in advance!
    P.S. My iPod is in its genuine state: it hasn't been jailbroken or anything like that.

    Unfortunately, I've already tried that. Also, here is a list of other things I've tried, but have taken no effect:
    -Recharging, Restarting, Resetting, and Reconnecting my iPod Touch to my computer
    -Restarting my computer
    -Reinstalling iTunes
    -Reinstalling all iTunes, Apple, and iPod USB drivers
    -Updating the same drivers (but no updates were found)
    -Using a different USB port
    -Connecting to a different computer (doesn't work on my Toshiba laptop either, which is running the same OS and the same version of iTunes as my PC)
    My backup plan was to copy the new songs to my iPod by pasting them through Windows Explorer. My iPod shows up as a portable device under My Computer - as always - but the only thing I can access is a folder full of the photos on my iPod. I think this is normal, but I can't do what I want to do! Do you (or anyone else) have any other good ideas? Remember, I really don't want to do a restore unless I absolutely have to.

  • How to read the data from excel file and store into the table?

    Hi All,
    I have table with BLOB datatype contains a excel file. I have to read that data from excel and store into one table with all the fields in excel.
    All the excel fields and my table columns are same.
    Can you share with me how can acheive this using LOB's?
    Thanks

    Hi OraSuirya,
    you can try with external tables .
    syntax as follows
    create table ext_table_csv (
    i Number,
    n Varchar2(20),
    m Varchar2(20)
    organization external (
    type oracle_loader
    default directory ext_dir
    access parameters (
    records delimited by newline
    fields terminated by ','
    missing field values are null
    location ('file.csv')
    reject limit unlimited;
    For this you need to create directory
    Directory Creation syntax:
    create or replace directory ext_dir as 'D:\oracle\user_dir\ext_dir';
    grant read, write on directory ext_dir to <User>;
    please paste the excel file in the particular directory .
    I hope this will help you.
    Please correct me if I am wrong anywhere .
    Thanks,
    Tippu.

  • How to read the data from an internal table,when column names are known

    Hi All
    I have a specific requirement. I got an internal table with many fields (let it be my_tab).  Some of the fieldnames (column names in internal table my_tab) are stored in separate internal table(let it be my_fields).
    I need to store/read data corresponding to the fields (whose name is stored in my_fields) from my_tab.
    I am able to build dynamic table (referred by field-symbol) with respect to the given field names in my_fields.
    But i am unable to read the data corresponding to the fieldnames from my_tab.
    Please provide  me some pointer in this regard.
    Regards
    Swetabh Shukla

    HI All
    Thanks for the prompt response. I got solution for my question. Please check below thread. For quick reponse i posted my question in one more category. Thanks to all of you.
    How to read internal table w.r.t. fieldnames stored in other table

Maybe you are looking for

  • Call RFC from EJB using SSO

    Can anyone point me in the right direction on the best practice for calling an RFC using SSO from an EJB? When using the local interface for the EJB, the only solution I see is to pass the authenticated IUser instance from the portal component to the

  • Importing multi-page PDF into ID.

    Help. I have a 25 page PDF file that is made to be printed and folded. The pages are setup in sequence. I want to be able to import all those pages, but I wonder how I would be printing the document if I'm able to import it in ID. I want to print the

  • System form resizing problem

    Hi, I expanded the width of the Sales Quotation system form and move fields to the right to allow space for new fields in the centre. I used the oForm.Width to adjust this. If I load the form, expand to full screen, everyhting is in the right place a

  • PSE 12 Organizer always crashing

    Any ideas?  Win 7.  Have plenty of memory and horsepower in the laptop.  Occurs even with other apps closed. 

  • Can't add iChat agent password to keychain...

    Here's one for you veteran iChatters...Is there some reason why I must type in the password for iChat agent each and every time I reboot? I've tried adding it manually to the keychain, but it still pops up with that annoying dialog at startup. It's t