Check out our Database and File IO Code Repository Files or visit the LabVIEW Wiki Database and File IO articles.
Tags |
(This content has not been tagged yet)
|
![]() |
May 29 2008, 12:55 AM
Post
#1
|
|||
|
Active Member Posts: 10 Joined: 16-May 08 Member No.: 11514 Using LabVIEW Since:2008 LV:8.5 ,8.5.1 ,.
|
Hello,
I want to write text into a text template file. For example, consider I open the template file which already has the following written in it: Name: DOB: Address: Phone: Now I have to write my name corresponding to the name field, and DOB,address,phone etc corresponding to its fields. When opened, it should look like: Name: Prads DOB: 10/10/2000 Address: 122 MyBlvd MyState 11111 Phone: 111-10101010 Can somebody tell me the VI's I got to use? How should I move precisely to the position where data has to be written next. I mean, say I have written the Name and DOB, and now Iam trying to write the address......How do i jump to the location pointer corresponding to the address field. Is there a VI or an example which calculates and correspondingly ignores those text which is already present so that I can write in the required position in the file? Thanks, prads
|
||
|
|
|||
| Ad |
May 29 2008, 12:55 AM
Post
#
|
||
|
|
|
||
|
|
|||
May 29 2008, 03:48 AM
Post
#2
|
|||
![]() Very Active Member Posts: 85 Joined: 13-August 03 From: Plymouth, Michigan Member No.: 151 Using LabVIEW Since:1993 LV:8.6 ,8.5.1 ,8.2.1
|
Hello, I want to write text into a text template file. For example, consider I open the template file which already has the following written in it: Name: DOB: Address: Phone: Now I have to write my name corresponding to the name field, and DOB,address,phone etc corresponding to its fields. When opened, it should look like: Name: Prads DOB: 10/10/2000 Address: 122 MyBlvd MyState 11111 Phone: 111-10101010 Can somebody tell me the VI's I got to use? How should I move precisely to the position where data has to be written next. I mean, say I have written the Name and DOB, and now Iam trying to write the address......How do i jump to the location pointer corresponding to the address field. Is there a VI or an example which calculates and correspondingly ignores those text which is already present so that I can write in the required position in the file? Thanks, prads I have doubts about your question.
|
||
|
|
|||
May 29 2008, 05:27 AM
Post
#3
|
||||
![]() Very Active Premium Member ![]() Posts: 218 Joined: 1-January 08 From: Perth, Australia Member No.: 10325 Using LabVIEW Since:2006 LV:8.5.1 ,8.6 ,.
|
I have doubts about your question. Yes that would be hard, but you could treat your data as arrays to overcome this. Try this...
Template_Folder.zip ( 12.08K )
Number of downloads: 47Code is in LV8.0 -------------------- all day...
|
|||
|
|
||||
May 29 2008, 06:33 AM
Post
#4
|
|||
|
Active Member Posts: 10 Joined: 16-May 08 Member No.: 11514 Using LabVIEW Since:2008 LV:8.5 ,8.5.1 ,.
|
Yes that would be hard, but you could treat your data as arrays to overcome this. Try this... Code is in LV8.0 Oh wow the above code is excellent. However is that possible with Write to Text File.vi as well or only with Write to Spreadsheet File.vi? Thanks, prads This post has been edited by prads: May 29 2008, 06:35 AM
|
||
|
|
|||
May 29 2008, 10:01 AM
Post
#5
|
|||
![]() Very Active Premium Member ![]() Posts: 218 Joined: 1-January 08 From: Perth, Australia Member No.: 10325 Using LabVIEW Since:2006 LV:8.5.1 ,8.6 ,.
|
Oh wow the above code is excellent. However is that possible with Write to Text File.vi as well or only with Write to Spreadsheet File.vi? Thanks, prads No worries Write to Spreadesheet uses the native Write to Text File VIs so yes....go for it! -------------------- all day...
|
||
|
|
|||
May 29 2008, 09:23 PM
Post
#6
|
|||
|
Active Member Posts: 10 Joined: 16-May 08 Member No.: 11514 Using LabVIEW Since:2008 LV:8.5 ,8.5.1 ,.
|
No worries Write to Spreadesheet uses the native Write to Text File VIs so yes....go for it! Hi, I have another small problem. In my implementation, the data file is a 1D array of string and the template is a 1D array of string. However when I use the build array.vi it still produces 1D array of string. Now the output of the build array does not let me connect to the Write to Spreadsheet File.vi's 2D input. So when I check the data.csv output file after running the code, it shows me my template completely first and then my input data. Somebody please help. regards, prads
|
||
|
|
|||
May 30 2008, 11:05 PM
Post
#7
|
|||
![]() Extremely Active Premium Member ![]() Posts: 535 Joined: 18-October 05 From: Seattle, WA Member No.: 3266 Using LabVIEW Since:2005 LV:8.6 ,8.5.1 ,7.1.1
My Blog
|
I would highly suggest looking at the context help window for your answer (concatenate inputs option). It will feed you for a lifetime
--------------------
|
||
|
|
|||
![]() ![]() |
| Time is now: 4th December 2008 - 07:26 AM |