0D/0A pair written into data file when it shouldn't be

Hello,
I have a data file problem. My customers data is written as a 398 byte row in a .csv file. It's OK that the row ends with a CR/LF. But the data is actually modified by the string to array or the write to spreadsheet function. In the example below you can see the data being written and the data as read back by HxD (a hex editor/reader). They are not equal anymore.
When an 0D is encountered in the data an 0D/0A pair is written, when an 0A is encountered an 0D/0A is written.
Any suggestions would be much appreciated.
Thanks in advance.
Barry
barry
Attachments:
Write test.vi ‏11 KB

I have had to switch to the Write To Binary File with an Open/Create File and Set File Position (end) ahead of it. This does work and is readable in a HxD window. Hopefully it will be just as useful when the data is analyzed in MatLab or some other program.
It does however add a header to the data which is not needed but acceptable by the customer. I find it a bit useful as I can ctrl-F through the data using the header info. In my case the header is constant.
Thanks.
barry

Similar Messages

  • Save Container into data file

    hii
    i have build very big VI that hold arry of container
    in which container it containe variables and arrys.
    i use it to configure the vi action (like controlling high of wave ,amplitude et cetera)
    until now i used "make Current values default" option to save
    variables and arry variables inside the arry container.
    i want to upgrade this technic to somting more advanced. like save this arry into data file.
    when i open the Vi it will read data file
    and when i will wont make change in the Vi i will press save button instead of "make Current values default".
    there is way to do it?
    just save arry of continers into file and read it after it?
    eyal
    Attachments:
    example.vi ‏8 KB

    there may be someting in 8.6 but for previous version I would suggest:
     Flatten to XML.vi
    would preserve the container(cluster) , and then  
    write to xml.vi
    and then when you start the mainvi you put a case t\f  and use
    first call.vi to select only when it start  and in this case true: read xml and  unflatten xml  etc....

  • Why does a mail-merge in MS Publisher split into multiple files when printed as a pdf file?

    Why does a mail-merge in MS Publisher split into multiple files when printed as a pdf file?

    'Cuz that's what mail merges do.  They create multiple documents based on the parent doc and all the names/addresses in your data tables.
    Perhaps if you describe exactly what you're trying to do & why you need PDF, we can point you to relevant tutorials.
    Nancy O.

  • I loaded my ipad photos from camera and all the pictures sorted by date.  Next, I did a sync with my computer and the photos were all reorganized into IMPRT folders an out of date sequence.  Any idea how to put the photos back into date files?

    I loaded my ipad photos from camera and all the pictures sorted by date.  I later sync my ipad with my computer and the photos were all reorganized into IMPRT folders an out of date sequence.  Any idea how to put the photos back into date files other than reloading all of them from camera?

    What version of iPhoto?
    Select one and rotate it. Then rotate it back. Does that make it appear? 
    A much better work flow is the keep the photos after importing.  Check the success the import, wait for at least one successful backup cycle then use you camera's format command to reformat the card
    LN

  • Translating descriptor file into data file of printlist using ABAP

    Hi,
    How to translate descriptor file contents into data file contents of Printlist?
    Anyone have any clue regarding this please reply ASAP.
    Thanks & Regards,
    Manali

    hi use the bdc or bapi or lsmw...for this ..to upload the data into sap

  • .dmg files forced into .xls files when downloading applications

    Why are dmg files being forced into xls files when I'm attempting to download applications from websites?
    MacBook1,1   Mac OS X (10.4.8)  

    Hi mospirit,
    first of all: WELCOME TO THE DISCUSSIONS!
    Sometimes files lose connection to their application. This can be solved quite easily though:
    1. Download Cocktail, OnyX or Tiger Cache Cleaner and reset the "Launch Services Database".
    2. Click any .dmg and type Apple-i to get the Information window. In the pop-up called "Open With" select "Other" and navigate to /System/Library/CoreServices. There select DiskImageMounter as default application. Finally back in the Information window click "Change All".
    If this answered your question please consider granting some stars: Why reward points?

  • Digital counter data is not written into a file

    Hello
    I'm a beginner with labview and I'm trying to make a measurement program for my setup (sensor data -> file). I have the USB-6008 and I'm trying to save data from  a digital counter and 3 analog ports. The counter is for RPM and the number of revolutions. Analog is used for force, potential voltage and temperature. Currently data from the analog ports is written to a file normally but all the data from the digital side is lost. So in the measurement text file columns for the digital data are empty.
    The DAQ assist for the counter is set "on demand" but the analog DAQ assist has a sampling rate of 1k (continous). My problem propably comes from the different sampling rates. I could set analog sampling to "on demand" but I need the 1k rate for the measurements. Also making two different measurements files works but it's very inconvinient.
    Am I right about the sampling rate and how would I fix this?
    Attachments:
    measurements.vi ‏144 KB

    Think Data Flow.  For a Loop to "loop", everything inside the loop must execute.  Furthermore, since your loop starts with "Acquire one sample" and ends with "write one sample", the time for the loop to execute will be the sum of the times to sample (1 msec) + write (??).
    Take advantage of the fact that LabVIEW in inherently parallel.  Instead of taking one sample/loop, take (say) 1000, but do not write them in the same loop.  Instead, "export" them to a parallel loop (via a Queue) so that when the 1000 samples arrive, they are written all at once.  While it is true that to acquire 1000 samples at 1KHz will take 1 second, most of that time will be spent "waiting" for the next sample to be taken (it takes almost no time to put a point on a Queue).  Similarly, if I have a whole second to write 1000 points to a file, that's more than enough time.
    Separating "serial" tasks into parallel streams is a common LabVIEW Design Pattern called the Producer/Consumer pattern.  There are numerous examples of this pattern, including a template that will write the basics of the code for you (open the File menu, choose "New...", From Template, Frameworks, Design Patterns, Producer/Consumer Design Pattern (Data)).  A slightly more sophisticated example can be found by starting LabVIEW, New Project, Continuous Measurement and Logging. 
    Bob Schor

  • Unable to write data into excel file when it's close

    Hi,
    I'm facing this problem and it's a bit weird. I'm using the following method to insert data into excel file. But when excel file is close, it unable to write data into the excel sheet. But it was able to write the data into the excel sheet if i open the excel file when running the program.
    Can anyone please tell me what's wrong to the code?
    public int updateLog(String sheet, String no, String cpId, String CatId, String rbtCode, String rbt, String rbtName, String artistName, String price, String rbtFileName, String songId, String msg){
            int result = -1;
            try{
                SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss",Locale.ENGLISH);
                String actionDate = formatter.format(new Date());
                rbtName = rbtName.replaceAll("'", "''");
                artistName = artistName.replaceAll("'", "");
                String sql = "insert into [Sheet3$] (Code, CpID, CategoryID, RBTCode, RBT, RBTName, ArtistName, Price, RBTFileName, SongID, UploadStatus, FileUploadedDateTime) ";
                sql = sql + " values ('" + no + "', '" + cpId + "', '" + CatId + "', '" + rbtCode + "', '" + rbt + "', '" + rbtName + "', '" + artistName + "', '" + price + "', '" + rbtFileName + "', '" + songId + "', '" + msg + "', '" + actionDate + "')";
                System.out.println(sql);
                log.writeLog(sql);
                result = stmnt.executeUpdate(sql);
            } catch(Exception e){
                e.printStackTrace();
                log.printStackTrace(e);
            return result;
        public int openConnection(){
            int result = -1;
            try{
                Class.forName(dbDriver);
                c = DriverManager.getConnection(conStr + excelFilePath+";ReadOnly=0;");
                stmnt = c.createStatement();
            } catch(Exception e){
                e.printStackTrace();
                log.printStackTrace(e);
                return -1;
            return 1;
        }Thanks

    HI,
    i hv a doubt regarding reading / opening of a
    password protected Excel file using jxl( java ) .
    How to read / open a password protected Excel file
    thro Java (jxl ) program .plz let me know some
    example also .
    Regards,
    Ramesh P
    845935822cross posting !! answered here
    http://forum.java.sun.com/thread.jspa?threadID=710466&messageID=9507085#9507085

  • Problem on loading DAT file when using 3G network modem

    Hello,
    I'm having some strange problem when I'm trying to load my game on the part where DAT file with Map Object is read, using 3G Network Modem. This issue started when I migrated my applet from one host to another. Everything loads well, until the user authentication. On user authenticatiom I'm recieving map name which I should load and show the user on it. I'm recieving the message where map name is mentioned, but after, when the process of loading map begins(when I need to read DAT file which is only 15KB) application blocks(browser and JVM also block).
    I thought it could be because of slow network communication, but it's not the reason, since I have tested(using Bandwidth limiter software) with 5 KBs/Second and it loads well and application is running well.
    Any clue why this can happen? If code is needed I'll post some pieces related to the process of map creation.
    URL or application: [ http://mimosa.dei.uc.pt/serhiy/demo/hoonline.html|http://mimosa.dei.uc.pt/serhiy/demo/hoonline.html]
    Accounts: test01/test01 ... test0n/test0n ... test05/test05 (n is number from 1 to 5)
    Thanks in advance!

    You have to upload it with FileReference.upload() to a PHP
    (or other server-side) script which saves it to a folder on the
    server. When the DataEvent.UPLOAD_COMPLETE_DATA event has been
    dispatched you can then use the FileReference.name to load from the
    file on the server just like any other image.

  • What does the attached files I email turn into dat files

    when I send email or receive email with attachments such as pdf or .docx, the files are unreadable on my iphone and become dat files.

    I have the same problem.  I found that by saving the file to FILENAME.pdf and reopening with Preview or Adobe it works.  I saw another post that suggested that long filenames that are forwarded to others are renamed with a .dat extension.  I never had this problem until I upgraded to the latest MAC OS.  Could that be the problem?

  • My SWF is not reading a data file when off my machine

    I have done a build out of Flash Builder 4.5.
    My app reads an external XML in the local dir and displays a pie chart and then a bar chart for each of the selected pie wedges.
    Works great for me.
    But when I share the SWF and XML with co workers the SWF does not seem to read the XML for them.
    Is there another file I need to provide them?
    Or is there a build setting I have not set?

    Thank you.
    I tried this and it seems to work.
    But a total standalone app is not what I am looking for.
    I am producing this for researchers that would then want to add these visualizations
      to their presentations and reports.
    So the product needs to be able to be embeded into Word docs, Power Point and the like.
    My goal is to produce an SWF that reads an external XML file for data to
      then visualize on charts.
    I have found that if I embed the data in the original mxml file it seems to work fine.
    I only am having trouble when I start trying to read external data.
    I guess I will resort to hard wiring the data into the SWF but it seems to not be right.

  • Links from RoboHelp don't convert into PDF file when "printing to PDF"

    I need to output my webhelp file to an Adobe PDF. However, my
    links are not converting UNLESS I put in part of the code. mailto:
    links will work if there is a visible @xxxxx on the screen.
    Regardless of the background code, if I don't have the @xxxx
    visible on the page, the link will not work. The "hand" will not
    turn into a "pointing finger" in the PDF file.
    I've looked at the settings, and am beating my head against
    the wall! This is a manual that will be published to a PDF on a
    weekly basis, so redoing all the links in Adobe is not a solution!
    I need my links to other parts of the manual, URLs and email links
    to work as the do in the RH side. All suggestions welcomed!
    Thanks!!
    p.s. I am using RH 5.0.2. The Adobe side is 7.0 Thanks!

    Hi Teri
    Links are retained in the version 6 release.
    Just some food for thought...
    Cheers... Rick

  • I have written into excel file, now how to draw chart

    My following code writes as excel file and displays it on browser. Now I want to draw a chart/graph over it. In standalone mode, I can set up macro in Excel to print charts. Now through servlet how do I bring up chart I want. I am giving my code below, please help on this
         protected void doGet(HttpServletRequest req,
    HttpServletResponse res)
    throws IOException, ServletException
              int marker=0;
         int i=0;
         int counter1=0;
         int header=0;     
         String QryString="";
              Connection con=null;          
    //          res.setContentType("text/html");
              res.setContentType("application/vnd.ms-excel");
              PrintWriter out = res.getWriter();
              out.println("<HTML><HEAD><TITLE>Chart Summary</TITLE></HEAD>");
              out.println("<BODY>");
              out.println("<table width=100% border=1>");
              out.println("<tr><td>");
         try {
              Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
              } catch(java.lang.ClassNotFoundException e) {
                   System.err.print("ClassNotFoundException: ");
                   System.err.println(e.getMessage());
         String url = "jdbc:odbc:INFO1";
              try {
         con = DriverManager.getConnection(url, "info1", "info1");
              } catch(Exception e){
              System.err.print("Not able to Connect to Access");
              marker=1;
              if (marker == 0)
                   System.out.println("Connected successfully to MS Access");
                   String query = "SELECT Date, NoOfRecs FROM ";
                   if("UPLOAD".equals(req.getParameter("Flow")))
                   query = query + "TBL_UPLOAD_SUM";
                   if(req.getParameter("FldFCTName").length() > 0)
                   if (QryString != "")
                        query = query + " AND FCTName LIKE '" + req.getParameter("FldFCTName") + "%'";
                   else
                        query = query + " WHERE FCTName like '" + req.getParameter("FldFCTName") + "'";
                   QryString = "SET";
                   else
                   query = query + "TBL_DWNLOAD_REC";
                   if(req.getParameter("FldFCTName").length() > 0)
                   if (QryString != "")
                        query = query + " AND FCTName LIKE '" + req.getParameter("FldFCTName") + "'";
                   else
                        query = query + " WHERE FCTName like '" + req.getParameter("FldFCTName") + "%'";
                   QryString = "SET";
                   query = query + " ORDER BY Date";
              try {                           
                   Statement stmt = con.createStatement();
                   ResultSet rs = stmt.executeQuery(query);
              out.write("\n");
         FileOutputStream out1; // declare a file output object
         PrintStream p; // declare a print stream object
    out1 = new FileOutputStream("./SureshServ/FileStats.csv");
    // Connect print stream to the output stream
    p = new PrintStream( out1 );
              out.println("<TABLE>");
                   while (rs.next()) {
                   String[] Fields = new String[2];
                   counter1++;
              Fields[0] = rs.getString("Date");
                   Fields[1] = rs.getString("NoOfRecs");           
                   p.println(Fields[0] + "," + (Fields[1].substring(1,Fields[1].length() - 1)));
                   out.println("<TR><TD>" + Fields[0] + "</TD><TD>" + Fields[1] + "</TD></TR>");
              out.println("</TABLE>");
         p.close();          
         rs.close();                
              }catch(Exception e){
                   System.err.print("Problem Fetching Fields");
         out.println("<CENTER><B>Chart Summary</B></CENTER>");                
         if(counter1 == 0)
              out.println("No records found for the selection");
         out.println("</TD></TR></TABLE><BR>");      
              out.println("</BODY></HTML>");
         out.close();

    It is hard to do it.
    I found that a java report tool Style/Report can do it very well.
    peter
    JawaBeginer (A useful JavaIDE tool)
    http://www.pivotonic.com

  • Number of lines being written into a file

    Hi All,
    I get "n" number of input text files - having "m" number of lines each.
    Based on the first character of each line (there are 5 distinct types I can get) i have to write each line in a separate file.
    To reduce I/O i am first storing the lines in "m" different StringBuffer objects (based on the first character of each line).
    Then finally I am storing each stringbuffer content (using stringbuffer.toString()) in a file... So finally I will have "m" different output files.
    Now I have a small constraint. The number of lines I can write to any output file cannot exceed 500. If it does, I have to create a new file with the same name but with an extension like "fileOne_1" and then save lines 501-1000 in the new file.
    How do I achieve this? Is there a solution in the usage of BufferedWriter/BufferedOutputStream/FileWriter/FileOutputStream to achieve this?
    Or is there some other way?
    Thank you.

    Ram wrote:
    Do the following with some logic. This is just a blue print to form the logic. Use FileInputStream and FileOutputStream.The blueprint is fine, but I would suggest using a BufferedInputStream and PrintStream(s). That way lines can be read in with readLine() and written out with println(), without the hassle of worrying about newline combinations.
    @OP: Don't worry about efficiency at this stage. Get your program working, and only worry about it then if you think there's a much better solution available. Ram's blueprint only requires you to store one line at a time. You'd be amazed how often the best programs are the simplest ones.
    Winston

  • Emailed jpeg files turn into .dat files

    why can't I open jpeg files that i email myself on my iphone 3Gs?

    Hold down the option key while dragging.

Maybe you are looking for

  • XDB Deinstall and install issue in 11gR1 Db and R12.1.2 Apps

    We have an issue with UTL_SMTP package. Whenever we are trying to access it through Ora-00600. I got one note 742014.1 and followed that. It worked for us and we are able to use the package without any issue. Now the problem is we have 150 + invalids

  • Note to Adobe: Noticing much more problems?

    I wanted to post an honest discussion with someone from the Adobe Flash team just so we can guide the future of Flash for version 10. I know it's still early and a long way from that as most of us battle with our AS3 migration, but I wanted to add my

  • I encountered an installation error

    I tried to install the adobe reader XI (11.0.04) abd tge installation failed. The notice I get is that Installer encountered an error that caused the installation to fail and asks me to contact the software manufacturer for assistance. I also cnat op

  • Drill-down into AWR reports

    Hi experts, any can help me in this topic Drill-down into AWR reports.

  • Rename dafile while using RAW device.

    HI, How to rename a datafile in raw devices. Thanks