LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

insert new value to existing csv file

Solved!
Go to solution

Hi,

 

I have a CSV file which I created using a totalizer. now I need to insert string values to this by searching the row

 

Eg:- first column is date so I will search the date and insert comment to it

 

attached the CSV file 

0 Kudos
Message 1 of 19
(4,748 Views)

You will need to read the entire file, do your search, add whatever data you need to, and then rewrite the file.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 19
(4,743 Views)

@crossrulz wrote:

You will need to read the entire file, do your search, add whatever data you need to, and then rewrite the file.



Something like this:

ExcelInsertVal_BD.png

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 3 of 19
(4,727 Views)

HI,

 

I tried do this but problem server PC is updating this CSV file on a time basis and client PC is displaying and exporting to excel whenever user export

0 Kudos
Message 4 of 19
(4,713 Views)

sandy1234 wrote:

I tried do this but problem server PC is updating this CSV file on a time basis and client PC is displaying and exporting to excel whenever user export


Share you code, please.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 5 of 19
(4,701 Views)

Hi

 

Thanks for your attention... please find the attachment

0 Kudos
Message 6 of 19
(4,670 Views)

This doesn't really show what your problem is. You should be able to easily implement the code I put above in to this VI you attached.

 

It's hard to tell what you meant by your statement above, but it sounds like the file is being updated from two different places? So you're having an issue updating the file from the local PC when the server is editing it too?

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 7 of 19
(4,661 Views)

Hi,,

 

Can you give me the code which you showed I hope it will work

0 Kudos
Message 8 of 19
(4,653 Views)

@sandy1234 wrote:

Hi,,

 

Can you give me the code which you showed I hope it will work



It's a code snippet.  Just copy it and paste it onto your block diagram.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 9 of 19
(4,638 Views)

HI,

 

 

Sorry I am not able to retrive the snipet... Its just remains as image

0 Kudos
Message 10 of 19
(4,620 Views)