07-14-2009 03:54 AM
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.
07-14-2009 04:07 AM
07-14-2009 04:35 AM
07-14-2009 04:46 AM
I'll try the stuff in the link first but if that doesn't work I'll try the active X stuff.
Thanks,
Matt.
07-14-2009 07:21 AM
No luck with the code in the tread could you please post the active x stuff you have for this job???
Thanks,
Matt
07-14-2009 07:39 AM
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
07-14-2009 07:51 AM - edited 07-14-2009 07:52 AM
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.
07-14-2009 07:51 AM - edited 07-14-2009 07:52 AM
07-14-2009 09:19 AM
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.
07-14-2009 09:37 AM - edited 07-14-2009 09:39 AM
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.