LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Update file name

Hi Nishant,

It is no problem to continue with the questions within this thread.  😄

I do not understand what you mean by the "big header".  I did look at you attached file and it is basically a text file with ".xls" extention.  It also opens nicely in Excel.

Are you talking about all the formatting header placed by Excel when you save it using Excel?  Actually, depending on the Excel version (especially recent ones), the data is in binary format.  And you can't easily manipulate it as a text file... You could use Active X... but before I suggest anything, I need to better understand the issue.

Remember: Anything is possible 😉 

Does your data file look exactly like the attachment?  Or is the attachment an example of what you want to achieve?

🙂

Ray

Message 31 of 94
(2,946 Views)

Hiii, Ray

                   By the word big header I want to say that, when we are using the one header option in the write LVM file, it shows the header like i ve shown you in the attached xls file with this message, but i don't want that kind of big header and i only want the header of the kind i ve shown in the pas xls file, but i couldn't do so, i can't attach that kind of header while using the write LVM file, i only can do that while using write to spreadsheet file or write character to file, etc. so thats wat i mean by the big header problem.

Thanks,

Nishant

Message 32 of 94
(2,947 Views)

Hi Nishant,

I am looking at your attached example, and I am not sure that I understand (early morning 😉  )

Is this what you are trying to achieve? 

LabVIEW Measurement

Writer_Version    0.92

Reader_Version  1

Separator           Tab

Multi_Headings   No

X_Columns        One

Time_Pref          Relative

Operator    nishant

Date          1/17/2006

Time          17:08.4

***End_of_Header*** 

Message 33 of 94
(2,934 Views)

Hiiii, Ray

        No I am not trying to achieve this, instead i dont want this kind of header, which also i can do but the main thing is can i add the header of the kind that i attached in the previous xls file and i only want that kind of header more than anything else, so is it possible to add that kind of header, while writing the data into the xls file with Write LVM.vi.

Thanks,

Nishant

Message 34 of 94
(2,926 Views)

Good morning Nishant,

By prevoious example, do you mean this one?

Date

Time

CH-1

CH-2

CH-3

CH-4

CH-5

…..

CH-48

You do realize that you can open / create the xls file  (or any type) in a previous step, meaning that you could have a sub-vi that opens or creates the file and you could even create the header at that time.  Then you close the file until you need to write to it.  The trick is to pass an index to the next vi (or sub-vi) so that you know where to start writing data to ( index the write location ).  That way, you can create any header because it is outside the "Write LVM.vi".

Let me know how it goes..
 
Ray
 
🙂
Message 35 of 94
(2,914 Views)

Thanks Ray,

          I came to know something out of it like, first creating the header through open/create excel file and then after passing the pointer to another vi, where we will write the data into the same excel sheet, in which we have wrote the header? am i right? i think this way, my problem might be solve, but what about the index in the excel sheet coz it should also know that from where in the excel sheet data should be written, another thing is i want the increasing file name while write the data, which is easily available by Write lvm.vi, that's why i am preferring the write lvm. vi, so whenever new file will be created, i ve to create the header inside it, that also might be somewhat difficult, so please suggest me something that way.

Thanks,

Nishant

Message 36 of 94
(2,909 Views)

Hi Nishant,

Yes, it is along those lines..  What you can do is create a sub-vi which creates the new file and immediately appends a header.  When completed, it returns a value for where to start writing data.  Or better, place that value into the header info, for later use. 

You might also consider a static value for where to start writing data if & only if the header info is static in size & content... but storing the pointer (location value) in the file itself is the safest approach.

Ray

🙂

Message 37 of 94
(2,904 Views)

Way to go Ray!

I suggest you change your name to "JobLabView"

The only time I stick with a topic that long is when there is  P.O. in place.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 38 of 94
(2,884 Views)

LOL!!  Ben!!

How are you? 

I've been sneeking into the forum between sw releases... And as you can probably tell, I've been releasing a lot 😄  and posting, too!

Seems like the Breakpoint is quieter...

Wishing you a good weekend, buddy!

Ray

🙂
Message 39 of 94
(2,879 Views)

Nishant,

Have a look at the attached vi's.

I cleaned it up a bit and fixed a bug when using a hardcoded folder (directory).

The vi will now create the file and header. 

Regards,

Ray

 

Message 40 of 94
(2,872 Views)