LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

write to string spreadsheet file.vi

Solved!
Go to solution

i am using Write to String Spreadsheet File.vi

I want to create a spreadsheet to a folder.

but if the file name is already exist, 

instead of it prompting me to overwrite it. 

Can it automatically rename it for me? how would i do that..

if lets say i have 

SN_50000.xls

and i want to create SN_50000(2).xls if SN_50000.xls is already created. 

i dont want to replace...

Best regards,
Krispiekream
0 Kudos
Message 1 of 16
(3,949 Views)
No, it cannot "automagically" rename it for you. You have to do that yourself. Use the Check if File or Folder Exists VI to see if the file exists. If so, change the name. Simple.
Message 2 of 16
(3,948 Views)
Solution
Accepted by topic author krispiekream
Take a look at the attached vi, this is one that I have used before.  I believe it will suite your needs.  Let me know if you find any mistakes or implement improvements.
Message 3 of 16
(3,943 Views)
thank you!!!!!
Best regards,
Krispiekream
0 Kudos
Message 4 of 16
(3,937 Views)

i am using labview 7.0 and i dont see the "CHECK IF FILE OR FOLDER EXISTS" function..???

 

Best regards,
Krispiekream
0 Kudos
Message 5 of 16
(3,927 Views)
You can use the OpenG version (look here).  You will have to download and install the VI package manager
0 Kudos
Message 6 of 16
(3,882 Views)

this there another option beside installing openG?

It doesnt seems to get installed on my computer..

 

Best regards,
Krispiekream
0 Kudos
Message 7 of 16
(3,869 Views)
I have attached the OpenG VI for your use.  You should go to the OpenG forums and figure out why the install does not work.  I think you would find it to be a benefit as there are many nice VI's that are well written and well tested.
0 Kudos
Message 8 of 16
(3,864 Views)

What is not getting installed? VIPM or the individual packages? LabVIEW 7 is supported, but in order to run VIPM you need to install the LabVIEW 8.2 Runtime. I'm guessing that's your problem.

 

A simply alternative is to use the File/Directory Info function and look at the error code. If you have an error and it's error code 7 it means the file doesn't exist. If there's no error, the file exists. 

Message 9 of 16
(3,861 Views)
What Smercurio wrote is essentially what the OpenG VI does.
0 Kudos
Message 10 of 16
(3,859 Views)