LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to use ActiveX to open/write to Excel template but not to overwrite it

Hi Juni,

Try this (attached). I inserted your For Loop that sends the data to a range, and your code for the file generation and dialog into my original example. It should prompt you to use the generated filename or an alternate filename to rename your template. We should be getting closer here. ;>)
Message 11 of 17
(1,418 Views)
Mike, I just wanted to thank you for the VI. It works just like I was hoping it would.

The next phase of my project deals with varible array sizes depending on user supplied input. I'll be extracting some of that imput to send to the excel file. I'm going to give it a shot before I ask for help.
Thanks for being there.
0 Kudos
Message 12 of 17
(1,418 Views)
Hi Mike...

Appreciated for your contribution on the zip file and also showed me where to put the auto-generate location file. thank you very very much!

My next question,
May I know too, where should I start with my string message. Since I have used Range - Cell 1 and Cell 2 for my data (numeric), how can I write the data (string) together into the same file.

The examples provied by Labview only write data repeatedly depending on a range of columns and rows.

But my data (string) need only to be written once to a specific location. Example, I would like the auto generate filename to be written onto the Excel sheet.
How can I do it? Another RANGE outside the FOR LOOP?

looking forward to ur reply,
juni
0 Kudos
Message 13 of 17
(1,418 Views)
For a quick way to write to a specific cell, you could use the Set Cell Value.vi that was included in my first
example. Just place it before the For Loop - check out the attached .gif file.
0 Kudos
Message 14 of 17
(1,418 Views)
Hi Mike...
Thanks for your tips again.
I have managed to manipulate numeric data and also string data into Excel format.
This is my last question to you.

Could you please check my codes for writing string data into Excel using For Loop and also using the Set Cell Value.vi. Is there a shorter and cleaner code to do it?

I have modified the Set Cell Value.Vi to make it do the way I want it to do.

Please have look on the JPEG file I have attached here.

Thanks,
juni
0 Kudos
Message 15 of 17
(1,418 Views)
I think you could have just placed the original Set Cell Value.vi into a For Loop to write to the multiple cells; but if your solution works and does what you want, use it.
0 Kudos
Message 16 of 17
(1,418 Views)
Ok, Mike...
You have been very helpful!
Once again, thank you for your advice!

Best Wishes,
juni
0 Kudos
Message 17 of 17
(1,418 Views)