04-29-2018 04:09 AM - edited 04-29-2018 04:26 AM
My purpose is simple , just to write several sheets in one book and rename the sheets.
I made a clutch array , each clutch contains three elements ,see as below(please ignore the numerical value,they may be uncorrect):
what I want is like the excel book as below:
I creat a diagram to achieve that,see as below:
It seems everything is OK,each step in the FOR loop I add one sheet and rename the sheet and write data into the sheet. but once I RUN the VI,error appear, and give me an empty excel document,see as below:
What shall I do ? I really need to write the array into one book ,because thay are closely related. (If I creat four excel documents and just use the first sheet of the documents , it works fine ,but this is not what I want ,I want write them in one document with 4 sheets)
I remember I had ever succeed for such operation , I am not sure whether I had changed the code
Solved! Go to Solution.
04-29-2018 09:15 AM
I recently wrote a routine that took data from a number of stations and created an Excel Workbook with one WorkSheet per station. Here are the steps I took:
I've found that before and after doing a Dispose Report when dealing with Excel, it is often a good idea to put a short "wait" of a few hundred milliseconds. Sometimes Office gets "cranky" if you try to process multiple reports in a row.
Bob Schor
04-29-2018 10:51 PM - edited 04-29-2018 10:53 PM
It seems any deeper operation always enconter error. my OS is WIN7 32bit and LaBVIEW2015 and Excel 2007.
04-30-2018 06:44 AM
Well, I can't examine the code (you failed to attach your VI), cannot read the Error Message, but can note that you are running a peculiar system, based on a 32-bit version of Windows 7 (most of us run 64-bit Windows 7 or 10), a fairly modern version of LabVIEW (2015), but a very old version of Office (2007, superceded by 2010, superceded by 2013). The two functions you show fail to connect the Error Line between them, and fail to terminate the Error Line in an Error Terminal. For which of the two functions did the Error occur? Do we know if a suitable Excel file exists? Do we know if it contains at least two WorkSheets?
Bob Schor
04-30-2018 11:25 PM
It may really be the reason of the software version compatibility that caused the error. After reinstalled OFFICE 2010, everything turns OK.
I consider that NI should give an instruction of the compatibility of them.
05-01-2018 07:43 AM - edited 05-01-2018 07:43 AM
@alii001 wrote:
It may really be the reason of the software version compatibility that caused the error. After reinstalled OFFICE 2010, everything turns OK.
I consider that NI should give an instruction of the compatibility of them.
NI has little control over the internals of Microsoft Office. "Keeping up with the Latest" of another company's proprietary code, especially trying to maintain compatibility with older versions, is not their Main Mission. In general, it is a good idea to have the OS, the LabVIEW Version, and ancillary Routines at a similar release level.
One thing to note -- problems have been noted with Excel 2016, and "fixes" have been posted on this Forum. I'm using Office 2013, myself, and have not encountered these issues ...
Bob Schor