Labview not reading csv file properly.

I'm trying to use the read spreadsheet file vi to read the attached csv.
It does a few things incorrectly:
1) the first cell of the resulting array has ÿþ appended to the front of it, seems like labview is grabbing some special character it shouldn't? (Notepad, notepad++ and excel can all open the file without issue and none show ÿþ or anything like it).
2) It's mistreating the EOL characters as two line feeds, resulting in blank rows between each data row. (Looking at the csv in notepad++ confirms that the lines are ended with a CR and a LF (same as EOL).
3) I'm reading it in as a string, because one of the columns is non-numeric, but then I strip that column out and attempt to convert the remaining string array into a numeric array (this fails). It also fails if I pull out an individual element of the array and attempt to convert it to a number (in both cases using fract/exp string to number), below I have an example of trying to read the 2nd column of the 1st row (index: 0,1) which is formatted as a string: "1.37238168716431" and converting that into a number gives 0 as you can see in the snapshot of the front panel.
Solved!
Go to Solution.
Attachments:
REPORT02.CSV ‏4 KB

I guess the file is in unicode, that doesn't help me very much.
I don't use the "Read from Text File Function" - at least not directly, although it is called in Read from Spreadsheet File. Where is it called, however, right-click doesn't show an option for Convert EOL, instead it's a terminal and it's default is F and as the terminal is disconnected, I'm assuming it's not converting EOL. So it's already "unchecked" in a sense.
No idea how to convert the unicode string to ascii. (no functions show up when i search unicode or ascii in the manager). It displays it just fine in the text box, so I'm not sure why it's able to display it without issue but not read it as a number.
Using Labview 8.6, by the way.

Similar Messages

  • Question about reading csv file into internal table

    Some one (thanks those nice guys!) in this forum have suggested me to use FM KCD_CSV_FILE_TO_INTERN_CONVERT to read csv file into internal table. However, it can be used to read a local file only.
    I would like to ask how can I read a CSV file into internal table from files in application server?
    I can't simply use SPLIT as there may be comma in the content. e.g.
    "abc","aaa,ab",10,"bbc"
    My expected output:
    abc
    aaa,ab
    10
    bbb
    Thanks again for your help.

    Hi Gundam,
    Try this code. I have made a custom parser to read the details in the record and split them accordingly. I have also tested them with your provided test cases and it work fine.
    OPEN DATASET dsn FOR input IN TEXT MODE ENCODING DEFAULT.
    DO.
    READ DATASET dsn INTO record.
      PERFORM parser USING record.
    ENDDO.
    *DATA str(32) VALUE '"abc",10,"aaa,ab","bbc"'.
    *DATA str(32) VALUE '"abc","aaa,ab",10,"bbc"'.
    *DATA str(32) VALUE '"a,bc","aaaab",10,"bbc"'.
    *DATA str(32) VALUE '"abc","aaa,ab",10,"b,bc"'.
    *DATA str(32) VALUE '"abc","aaaab",10,"bbc"'.
    FORM parser USING str.
    DATA field(12).
    DATA field1(12).
    DATA field2(12).
    DATA field3(12).
    DATA field4(12).
    DATA cnt TYPE i.
    DATA len TYPE i.
    DATA temp TYPE i.
    DATA start TYPE i.
    DATA quote TYPE i.
    DATA rec_cnt TYPE i.
    len = strlen( str ).
    cnt = 0.
    temp = 0.
    rec_cnt = 0.
    DO.
    *  Start at the beginning
      IF start EQ 0.
        "string just ENDED start new one.
        start = 1.
        quote = 0.
        CLEAR field.
      ENDIF.
      IF str+cnt(1) EQ '"'.  "Check for qoutes
        "CHECK IF quotes is already set
        IF quote = 1.
          "Already quotes set
          "Start new field
          start = 0.
          quote = 0.
          CONCATENATE field '"' INTO field.
          IF field IS NOT INITIAL.
            rec_cnt = rec_cnt + 1.
            CONDENSE field.
            IF rec_cnt EQ 1.
              field1 = field.
            ELSEIF rec_cnt EQ 2.
              field2 = field.
            ELSEIF rec_cnt EQ 3.
              field3 = field.
            ELSEIF rec_cnt EQ 4.
              field4 = field.
            ENDIF.
          ENDIF.
    *      WRITE field.
        ELSE.
          "This is the start of quotes
          quote = 1.
        ENDIF.
      ENDIF.
      IF str+cnt(1) EQ ','. "Check end of field
        IF quote EQ 0. "This is not inside quote end of field
          start = 0.
          quote = 0.
          CONDENSE field.
    *      WRITE field.
          IF field IS NOT INITIAL.
            rec_cnt = rec_cnt + 1.
            IF rec_cnt EQ 1.
              field1 = field.
            ELSEIF rec_cnt EQ 2.
              field2 = field.
            ELSEIF rec_cnt EQ 3.
              field3 = field.
            ELSEIF rec_cnt EQ 4.
              field4 = field.
            ENDIF.
          ENDIF.
        ENDIF.
      ENDIF.
      CONCATENATE field str+cnt(1) INTO field.
      cnt = cnt + 1.
      IF cnt GE len.
        EXIT.
      ENDIF.
    ENDDO.
    WRITE: field1, field2, field3, field4.
    ENDFORM.
    Regards,
    Wenceslaus.

  • Use servlet read .csv file by ie, but why two more " ?

    Hi , friends
    following is the key method in my servlet used to read .csv file to ie , but , after I read file to client side , I found that in the both sides of every line " was added, so the csv file can have only one column (many columns was merged into one column), that was not what i want, who guys can find some idea? thanks for your enthusiasm!
    void serveRemoteFile(String sFileName, String sContentType, HttpServletRequest req, HttpServletResponse res, StringBuffer sbLog, Runtime rt){
    FileInputStream in = null;
    ServletOutputStream out = null;
    byte bBuf[] = null;
    int nLen;
    if (isBlank(sContentType) || isBlank(sFileName))
    return;
    res.setStatus(res.SC_OK);
    res.setContentType(sContentType);
    res.setHeader("Content-Disposition", "inline;filename= temp.csv");
    try {
    in = new FileInputStream(sFileName);
    out = res.getOutputStream();
    bBuf = new byte[1024];
    while ( (nLen = in.read(bBuf,0,1024)) != -1) {
    out.write(bBuf, 0, nLen);
    out.flush();
    out.close();
    }catch (FileNotFoundException e){
    errorPage(req,res,sbLog);
    }catch (IOException e){
    errorPage(req,res,sbLog);

    Excel uses a weird CSV file format. You can find more information about it and a Java library to read data from it here:
    http://ostermiller.org/utils/ExcelCSV.html

  • Vision acquisition not reading avi file

    Hi-- I am currently running LabView 2010 (version 10.0f2) to run the Multi-Worm Tracker (http://sourceforge.net/projects/mwt/).I am currently using the Vision Acquisition Software evaluation version, though I do not have any image acquisition hardware or camera connected; I am only concerned with running AVI files. Everything seems to work perfectly except the program does not appear to "see" the file, even though I am able to select it upon opening without issue.
    It appeared to me to run and track images the very first time I ran MWT, though I was not able to see the video at the time. However, it has not worked since that first time. I am curious if anyone out there has thoughts on:
    1) Whether or not it is the vision acquisition software that is responsible for this problem
    2) If the evaluation version only works once (seems silly as it is good for 30 days... 28 now)
    3) What I might be able to do to troubleshoot this
    Thanks for your help,
    Kevin Burls
    University of Nevada, Reno

    -Sorry no info on how you are reading avi file?
    -It is just an exe. That too looks like it needs lot of other dependencies.(Or am i missing anything??)
    -If you need to clarify your doubt on Vision acquisition, just use one of the inbuilt examples in labview for reading avi files and then proceed.
    -No, i think evaluation version works untill evaluation time expires.
    -You need to provide the code not exe to troubleshoot on more.
    Thanks
    uday,
    Please Mark the solution as accepted if your problem is solved and help author by clicking on kudoes
    Certified LabVIEW Associate Developer (CLAD) Using LV13

  • I am trying to import cr2files from the camera into lightroom 5 and keep getting an error message saying Lightroom can not read the files and therefore will not import them.  Has anyone had a similar problem-.thanks

    I am trying to import cr2files from the camera into lightroom 5 and keep getting an error message saying Lightroom can not read the files and therefore will not import them.  Has anyone had a similar problem….thanks

    If you are having the same problem, i.e. a disk permission problem, open your favorite search engine and search on, "change disk permissions", and I think you'll find plenty of information on how to fix the problem. This is a Lightroom forum. Your problem is with your operating system. There is no sense in rewriting instructions that are already available if you do a simple search.

  • I have lost my photos/videos when i imported from my ipad 2 to my new imac latest version and it's not reading the files.  I have downloaded iMac library manager and can see them. can someone shed some light please ?

    i have lost my photos/videos when i imported from my ipad 2 to my new imac latest version OS X 10.8.4
    and it's not reading the files.  I have downloaded iMac library manager and can see them.  when i go back into iphoto i'm getting the following message :
    Do you want to switch the current iPhoto Library from “iPhoto Library.photolibrary” to “iPhoto Library.photolibrary” and relaunch iPhoto?
    I don't know what to do - please help !!!!
    can someone shed some light please ?

    So it appears you have only one library on the hard drive. Apply the two fixes below in order as needed to that library:
    Fix #1
    1 - launch iPhoto with the Command+Option keys held down and rebuild the library.
    2 - run Option #4 to rebuild the database.
    Fix #2
    Using iPhoto Library Manager  to Rebuild Your iPhoto Library
    1 - download iPhoto Library Manager and launch.
    2 - click on the Add Library button and select the library you want to add in the selection window..
    3 - Now that the library is listed in the left hand pane of iPLM, click on your library and go to the Library ➙ Rebuild Library menu option.
    4 - In the next  window name the new library and select the location you want it to be placed.
    5 - Click on the Create button.
    Note: This creates a new library based on the LIbraryData.xml file in the library and will recover Events, Albums, keywords, titles and comments.  However, books, calendars, cards and slideshows will be lost. The original library will be left untouched for further attempts at fixing the problem or in case the rebuilt library is not satisfactory.

  • ERROR:Could not read archive file - during Processing Base System Part 2

    Hi there,
    What I have:
    * I have problem with installation of the Mac OS X Panther v10.3 on iMac.
    * I have 3 original CDs (black with silver X).
    What I did:
    * I made new 1 partition and formated disk as Mac OS Extended (Journaled) over the Disk Utility in the first CD as normal without additional options (if I tried to format disk with zero all data and 8 way random write format after 3 days computer freeze)
    * I verified disk over this utility - that was ok - HFS volume verifed.
    * Then I restarted the computer and ran installation from this first CD
    What happened:
    * installation did not finish, because there were some problems during installation process.
    * i tried to customize installation just for essential work (without other languages support, printers etc), but it was still the same problem
    Installation log:
    After I choosed installation type, there was first error, but it did not look like important.. - root: bootstraplookup(): unknown error code
    Checking your installation disk - OK
    Preparing disk - OK
    Preparing base 1 and 2 - OK
    Other preparing.. - OK
    Processing Base System Part 1 - OK
    Processing Base System Part 2
    ==
    ERROR:Could not read archive file. - pax: Invalid header, starting valid header search.
    ERROR:Could not read archive file. - pax: Invalid header, starting valid header search.
    last message repeated 2 times
    ERROR:Could not write file. - pax: WARNING! These patterns were not matched:
    Some files for Essentials may not have been writen correctly.
    root: Installer[108] Exception raised during posting of notification. Ignored. exception: Some files for Essentials may not have been written correctly. (code 1)
    Install Failed
    Error detected
    Name: NSGenericException
    Reason: Some files for Essentials may not nave been written correctly. (code 1)
    ==
    It seems like a problem with reading some data from the CD, but during the installation checking of disk was ok.. maybe it can be problem with the cd-rom..? Or problem with data on cd-rom - I mean bad archive file..? But it is original CD.. What do you think??
    Thank you!

    Tomas,
    On THIS Page, locate your iMac model.
    From the Documents column, click on the appropriate number link.
    Using the info in the document that opens, locate the serial number of your iMac.
    On THIS Page, in the text field for Search Tech Specs, enter that serial number.
    Click on the model of iMac that appears.
    Post a link to the page that opens, or post the info requested below.
    Exactly which model iMac is it?
    What is the Processor speed?
    What size is the Hard Drive?
    How much Memory is installed?
    What type of internal Optical Drive does it have?
    Which version of OS, was the original Installed Software?
    ali b

  • Adobe 11 will not read my files.

    I have downloaded Adobe 11 several times, with and without the anti-virus set, and though it recognises my files Microsoft reports it had 'encountered a problem and is closing it down' when I try to open them.  When I restore the system to Adobe 9 it opens my old files but, obviously, not those in '11' format.  Any ideas?

    Well, it's like this.  Someone sends me some printed  information.  A bill.
    A report ,  It downloads.  I try  to open it and it tells me I need Adobe
    Reader 11 to do so and gives me a  link.  .  I download from the link.  It
    takes an age but in the  end it tells me I have successfully downloaded Adobe
    Reader 11. When I try to  open the file Microsoft tells me they have
    encountered a problem and are closing  it down.  When I try to open any of my
    saved Adobe Reader files I then  get the same message.  I have to use System
    Restore to get the facility of  Adobe Reader 9  back.  Then it opens my saved
    files again.
    In a message dated 04/11/2012 02:36:32 GMT Standard Time, 
    [email protected] writes:
    Re:  Adobe 11 will not read my files.
    created by Pat Willener (http://forums.adobe.com/people/pwillener)  in 
    Adobe Reader - View the full  discussion
    (http://forums.adobe.com/message/4821557#4821557)

  • Illustrator files cannot be opened: Could not read the file because an error has occurred.

    I cannot open some files from  Illustrator which contain PNG files placed. When I try to open the file, I get a message saying: "this png contains addtional data for Adobe fireworks, which will be discarded upon save." When I press "ok" I get the same screen again. When I press "cancel" I get: "coulld not read the file because an error has occured". I am currently working on a Mac Mavericks. Using Illustrator cc and Fireworks CS6.

    Eliana,
    If you have some file corruption, one thing often tried first is to create a new document and File>Place the (PDF contents, if any of the) corrupted one to see how much may be rescued that way.
    Here are some websites where you can see whether it can rescue the actual file, and if it can, you may pay for a subscription to have it done,
    http://www.recoverytoolbox.com/buy_illustrator.html
    http://markzware.com/adobe-software/fix-illustrator-file-unknown-error-occurred-pdf2dtp-fi le-recovery/
    http://www.illustrator.fixtoolbox.com/
    As far as I remember, the first one is for Win and the second one is for Mac, while the third one should be for both.
    Here are a few pages about struggling with it yourself:
    http://daxxter.wordpress.com/2009/04/16/how-to-recover-a-corrupted-illustrator-ai-file/
    http://helpx.adobe.com/illustrator/kb/troubleshoot-damaged-illustrator-files.html
    http://kb2.adobe.com/cps/500/cpsid_50032.html
    http://kb2.adobe.com/cps/500/cpsid_50031.html
    http://helpx.adobe.com/illustrator/kb/enable-content-recovery-mode-illustrator.html

  • Adobe Reader will not read pdf files on internet

    I have lastest version of Adobe reader on a new mac running OS 10 Maverick. This has latest safari (7.0.1) as my internet browser. My adobe reader reads pdf files already present on my desktop, but will not read pdf files from the internet even after I allow "trust" this site. Can anyone help me to resolve the issue please. Is it a bug that Adobe has not solved??

    Sorry if you did not understand my instructions.
    Regarding bullet point 4: Check Reader >Preferences > Internet > Web Browser Options> The blessed app should be " /Applications/Adobe Reader.app"
    You specified that you don't see the path, then it might be some problem in your installation.
    Please see the attached image and let me know what you see on your system.
    Regarding bullet point 5: Load PDF in Safari.
    This means open any PDFs in Safari web browser.
    Please make sure the below highlighted plug-ins are installed on your system by going to the specified path. And make sure the version of the below two plug-ins are 11.0.06. You can find the version by selecting the plugin and hit Command+i.
    Go to your Main Hard Disk/Library/ Internet Plug-Ins/ AdobePDFViewerNPAPI.plugin
    Go to your Main Hard Disk/Library/ Internet Plug-Ins/ AdobePDFViewer.plugin
    Please let me know if these help.
    Thank You

  • Why my device not read pdf-files in mail messages?

    Qq
    why my Nokia device not read pdf-file on mail message?

    What is the operating system on that device?
    Do you have Adobe Reader installed?
    What exactly means "not read"?

  • I have a problem with the mac can not read video files with the extension IMOD. How can I solve this problem?

    I have a problem with the mac can not read video files with the extension IMOD. How can I solve this problem?

    By doing a Google search. 

  • "could not read the file because the plug-in could not understand the file."

    "could not read the file because the plug-in could not understand the file."
    I keep getting this error when trying to open some of my illustrator files. Usually after trying 5 or 6 time it will mysteriously open without a problem. I've reinstalled Illustrator and that didn't work. I've uninstalled and reinstalled CS3 and that didn't work.
    Why does it sometimes open and sometimes not???
    I've lost I don't know how many hours screwing around with this and REALLY pissing me off!!!
    AURGH!

    I think this has something to do with the PNG plugin.

  • Whenever i try to download a rather large file i continue to get the "could not read source file" error. Tried new profile, uninstalling and looking for the compreg.dat file to delete nothing is working. Please help

    whenever i try to download a rather large file i continue to get the "could not read source file" error. Tried new profile, uninstalling and looking for the compreg.dat file to delete nothing is working. Please help

    Did you reinstall CS3 after CC?
    For that matter, doing an in-place upgrade on the OS is always a gamble with Adobe programs. Reinstalling all the versions you need, in order, would probably solve your problem.
    And you shouldn't need to save as IDML after opening the .inx in CC.

  • CS3 not reading xmp files generated in CS2.

    CS3 is not reading xmp files generated in CS2.
    If I open a raw file that was adjusted in ACR in PSCS2 with PSCS3 it does not recognize the adjustments that were made to the file.
    PSCS3 opens the file in ACR with the default settings and I lose all of the adjustments and crops.
    Is anyone else having this problem. If so: is their a fix or a stting I should use?

    First. make sure you have updated to Bridge 2.1.0.100.
    2nd, Purge the Cache from the TOOLS menu in Bridge.
    3rd, Delete and rebuild your Bridge preferences by holding down the Option key (Command+Option, or Command+Option+Shift work as well) immediately after launching the application.
    4th, if that doesn't work, make a fresh, new Mac account and log in as a different user.
    Then report back.

Maybe you are looking for

  • Play plugin doesn't show up 64bit

    Anyone been able to fix the play plugin so it shows up in 64bit ? any suggestions? Thanks, Paul

  • Expiration and Clean up thread - MDM connector - Visual administrator

    Hi Experts! I  need some suggestion from the Visual administrator - MDM connector. We have the default setting for maximum connections, clean up thread time and the expiration set. As of now, clean up thread value is 300 seconds. and Expiration value

  • VoIP & AutoQoS & frame/atm

    I have 2 remote locations connected via frame/atm links currently with no QoS configs and potentially running VoIP. Is AutoQoS the simpliest and/or best solution, for voip communication across the WAN(frame/atm) if no other QoS is required ? Thanks f

  • Regarding Number Ranges

    Hi Experts, I am New to ABAP. Can any one Help me in telling What is SRNO - Number Ranges T.Code? How to Create Number Ranges? How it is useful in SE11. If any one have Material Regarding this T.code Give to me. Thanks in advance.

  • This is very urgent !!!

    hi all how to minimize all the application running in windows. you have opened explorer,IE browser, DOS and some othere application. i wanna minimize all the applications using java(Click a button). how do i solve it, regards Pradheep [email protecte