LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error -41110 in excel report

Solved!
Go to solution

Yes i can see the difference but how can i make an excel template that has first worksheet with heading and everything and the remaining work sheets has the table for test results. And one more thing test number are not constant in this case.

Also if i want this VI to work. Can you please guide me throgh...it would be very helpful..

0 Kudos
Message 11 of 22
(1,999 Views)

Just open up Excel and create the worksheets like you explained. If you really need a variable number of worksheets, then you will have to create the sheets in LabVIEW. Just use the Add Worksheet VI followed by the Rename Worksheet VI.

0 Kudos
Message 12 of 22
(1,998 Views)

Thats what i did. I create an empty excel file. Read it in my VI and write in first worksheet the heading and other things and then add worksheets for results but it returns an error.

If you can just shown me the way that every sheet is the same let say each sheet contain the heading thing and resulting table, i will be very thankful. Beacuse the program i attached is giving error.

0 Kudos
Message 13 of 22
(1,995 Views)

No, you are calling "Add Worksheet" and then "Get Worksheet". You want to call "Rename Worksheet". You need to find out where in your program you are getting the error. Try probing the error wires to see where it occurs.

0 Kudos
Message 14 of 22
(1,992 Views)

i tried this approch using the following links:

https://decibel.ni.com/content/docs/DOC-20014

https://decibel.ni.com/content/docs/DOC-4262

What i am doing here is loading my file then entering the title etc, then getting its properties,then adding worksheet and then  loading that worksheet for entering data into it.

 

0 Kudos
Message 15 of 22
(1,988 Views)

Ok, well I notice right off the bat you added 1 to the index number in the example you provided. Please try to find where your error is occurring.

0 Kudos
Message 16 of 22
(1,985 Views)

I am trying. But if you know it please point it out that is why i posted the question here. I will try to make it correct if i can

0 Kudos
Message 17 of 22
(1,983 Views)

I am trying. But if you know where it is please point it out thats why i posted so some one can help. Then i will try to resolve it if i can.

 

Regards

Omer

0 Kudos
Message 18 of 22
(1,983 Views)

No, I don't know where the error is occurring. Here is an example

 

Excel Report.png

0 Kudos
Message 19 of 22
(1,980 Views)

 Omershah,

 

     You describe making a multi-sheet Excel Workbook.  Here's a question for you -- is there a "standard form" for the WorkBook, i.e. it always has a WorkSheet called "Header", "Test 1", "Test 2", and "Test 3"?  Or does it have a more "flexible" design, say a Header Worksheet and then N "Test" Worksheets (called "Test 1", "Test 2", etc.)?

 

     In the first case where the format is fixed, you can create a "dummy" (or "Template") Workbook (call it "Dummy.xlsx") with Header, Test 1, etc. WorkSheets.  You open Excel specifying Dummy.xlsx as the Template.  You use the Excel Get Worksheet function, specifying the name of the Worksheet you want (e.g. "Header"), write data to it, then get Test 1, write more data, etc.  When you are done, you save the Worksheet using a different name (so you can reuse the Template).

 

     In the second case, you pretty much need to create each Worksheet "from scratch".  Excel, by default, gives you three when you open it, called Sheet 1, Sheet 2, and Sheet 3.  Select a Sheet, put whatever data you want on it, select another sheet, put more data, and if you run out of Sheets, use the Excel Add Worksheet to create more of them.  When you are done, name and save the Workbook.

 

     All of this assumes you have access to the Report Generation Toolkit, which has all those nice functions that Gregory showed you and that I described here.

 

Bob Schor

0 Kudos
Message 20 of 22
(1,967 Views)