LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Writing to .xls

I am already using the write to spread sheet function in the code to output a VI curve to a spread sheet but when I find it to open it it is of 'unknown format' althogh it will open in notepad and will import to excel.  Is there anyway I can write it directly into a .xls spread sheet.  Any help would be appreciated.

 

Thanks,

Matt.

0 Kudos
Message 1 of 11
(3,120 Views)
See this
0 Kudos
Message 2 of 11
(3,114 Views)
I don't suppose you'd consider using ActiveX controls to communicate with Excel? If so, I've got a few bits of code you might find useful! 🙂


Never say "Oops." Always say "Ah, interesting!"

0 Kudos
Message 3 of 11
(3,104 Views)

I'll try the stuff in the link first but if that doesn't work I'll try the active X stuff.

 

Thanks,

Matt.

0 Kudos
Message 4 of 11
(3,101 Views)

No luck with the code in the tread could you please post the active x stuff you have for this job???

 

Thanks,

Matt

0 Kudos
Message 5 of 11
(3,076 Views)

Have you looked at this thread which talks about Excel.  You should find what you need here:

http://forums.ni.com/ni/board/message?board.id=BreakPoint&message.id=2391#M2391

 

Message 6 of 11
(3,071 Views)

I've got a post in there, but I'm attaching the more generic VIs from my example's hierarchy.  If you need me to explain any of their functions, please ask but they should be fairly self-explanatory.

 

Hope they help somewhat.

Message Edited by James Mamakos on 07-14-2009 01:52 PM


Never say "Oops." Always say "Ah, interesting!"

Message 7 of 11
(3,067 Views)
...oops - duplicate post.
Message Edited by James Mamakos on 07-14-2009 01:52 PM


Never say "Oops." Always say "Ah, interesting!"

0 Kudos
Message 8 of 11
(3,066 Views)

Thanks for thge help one question for the write to excel function does it have to write to an existing file or will it justy make a new spread sheet with the data in???

 

Thanks for the help,

Matt.

0 Kudos
Message 9 of 11
(3,046 Views)

My 'Write to Excel' VI will only write to an existing Excel worksheet (specified by name or number) within a workbook (doesn't have to be a saved file). My 'Open Excel' VI opens up a new instance of Excel (if it's not already open) and creates a new workbook. I then change the name of, add, or delete the sheets within the workbook and then write to them as required. You can either save it programmatically or manually if you wish, though that'll need a separate bit of code.

 

P.S. Just a quick note on my 'Write to Excel' Vi, it can handle up to 2D arrays of strings or numbers, but can only input formulae one cell at a time. 

Message Edited by James Mamakos on 07-14-2009 03:39 PM


Never say "Oops." Always say "Ah, interesting!"

Message 10 of 11
(3,037 Views)