05-16-2007 08:44 PM
05-16-2007 11:16 PM
05-17-2007 02:01 PM
05-17-2007 03:03 PM
05-17-2007 03:09 PM
With the wire tool, connect the output terminal called 'New File Path' of Write to Spreadsheet File to the input terminal called 'file path' of Open/Create/Replace File. This means you have to delete the file constant you have now. The shipping version of Write to Spreadsheet File has no error out connection. I've been using my own with a connection for so long that I forgot that. That doesn't matter as long as you wire the file paths together. That's enough to enforce dataflow.
Understanding what dataflow is, how it works, and when to use or not use it is essential to understanding LabVIEW and writing programs with it. It is really the basic concept of LabVIEW. A function does not execute until the data for that function is present. Functions not connected by dataflow will execute in parallel (or attempt to anyway). Because you had no dataflow between the Write to Spreadsheet and the Write to Text File, you don't know which will actually execute first. Putting one funciton to left/right/top/bottom of another does not affect execution order at all.
05-17-2007 03:15 PM
ohh...not a real singer.:)
i have 2 dimentional array of integers,which i write to text file by "write to spreadsheet file" (Example : 1.txt )
now lets say i want to insert a string to same file after each row contents (string should be in between row of integers)
i tried by writing string to 1.txt file with "write text file" ,but it is overwriting the previous contents i.e, 1st row elements written by "write to spreadsheet file"
Praveen
05-17-2007 03:25 PM
Again, back to my statement that a file is just a long string of characters. A file has no concept of "lines". If you e.g. want to insert certain text after a certain line, you need to find the position of the n'th linefeed, read everything after that into a string buffer, then write your new line, followed by writing the content of the string buffer. If you insert N characters into a file at point A, all characters at higher indices need to be moved to make space.
@praveen2 wrote:
i have 2 dimentional array of integers,which i write to text file by "write to spreadsheet file" (Example : 1.txt )
now lets say i want to insert a string to same file after each row contents (string should be in between row of integers)
i tried by writing string to 1.txt file with "write text file" ,but it is overwriting the previous contents i.e, 1st row elements written by "write to spreadsheet file"