Showing results for 
Search instead for 
Did you mean: 

Need simple example for writing to Excel

Now I see your fault. You are not correctly using the open create in conjunction with the path to string. You do not need the open/create all you have to do is feed it a path and the active X will take care of the rest. if you want the user to be able to choose this path then use the file dialog VI. then feed the path to the path to string function and from there to the open book vi. I'm not sure about the read only stuff you were getting but it could be due to the file setting or if the reference to the file was not closed properly this could do it also. MAKE SURE YOU CLOSE ALL REFERENCES WHEN THEY ARE NOT NEEDED. Not yelling I'm just giving you a warning.

0 Kudos
Message 31 of 47
You mean to say "With out using Open Create Function." As showed in attached diagram. If it is then i tried but it is telling file missing error.
Please see the attachement.
0 Kudos
Message 32 of 47


Seen a lot of answers here. Can you post the code ? Curious to see why it is not working.

What is the error telling ?

Message Edited by K C on 11-28-2006 08:23 AM

0 Kudos
Message 33 of 47
Thanks K C for the reply.
Please see the attached code. I would like to create a file from labview. This will be in the loop so next  time i will overwrite in the file with out a prompt "you want to save or not".
0 Kudos
Message 34 of 47

Do you already have a program that uses these VI's ?

What version LV do you use ?

Message Edited by K C on 11-28-2006 10:58 AM

0 Kudos
Message 35 of 47
I have LabView 8.0. My rest of the code is working fine. So no problem with out these VI's. Have you executed  my code at your place.
0 Kudos
Message 36 of 47


There are several things wrong (I mean i did it differently)

- select the correct ActiveX application (I can't see what you have chosen)

- After a excel open you should open a workbook and use the reference from that

- a sheet name as a string must be converted to a variant variable

Maybe you can use this VI as a start. Let me know if this helps

0 Kudos
Message 37 of 47

Thanks for the code.

But i want to create a excel file from labVIEW and write data in to it repeatedly. That is giving me error. But if i use a file created by me manully then it is working fine for me.

I mean to say if the user give a excel file path which is not present then labVIEW will create a excel file with the user specified name and fill the data in to it.

I hope now i am able to tell my problem clearly.



0 Kudos
Message 38 of 47
Hi Rikki,
In my VI just change the 'close' at the end into a 'save as' method.
Convert your patth+filename into a variant variable and wire it to the filename input.
I think you can adapt this for your use. Let me know if it works.
Message 39 of 47

Thanks Alot...

I did modification in my code. Now it is working very fine. Thanks alot for your help.

I dont know how to give rating .But it is 5 Star. Please tell me how can i give rating to your answers.


0 Kudos
Message 40 of 47