12-20-2016 04:36 AM
Yes as i have sent in the screenshot it works for me in case of .xls files.
Can you please suggest a way I can do this. I am new to labview and i cant find any suitable solution.
12-20-2016 04:44 AM
12-20-2016 07:45 AM
i have attached the VI i am using to read data from .xls file. It works perfectly with .xls format.
However now i need to work with .xlsm files and i want to use them directly (without converting into .xls fromat.
When i use .xlsm i get the error message code -2146827284
"Exception occured in Microsoft Excel: Select method of Range class failedHelp Path is xlmain11.chm and context 0 in Excel Get Data Specified Field.vi".
I have attached the VI and a screenshot of error message.
please help !!
12-20-2016 07:47 AM
This is a slightly different answer to your question. Yes, it (probably) is possible to read data from an .xlsm file in LV 8.5.1 without using the RGT. However, in LabVIEW 2016 with the RGT, not only can you read it, but you can write the code to read it in under 5 minutes. If Time = Money, this may be "cost-effective".
Incidentally, it returns an array of 11 rows, 68 columns in under 2 seconds.
Bob Schor
12-20-2016 07:53 AM
I just posted code in response to your earlier message ("Is it possible to read .xlsm") showing my solution using the RGT that I coded in under 5 minutes and that worked the first time. If doing this is important to you, you might consider upgrading to a more modern LabVIEW Version + the Report Generation Toolkit.
Bob Schor
12-20-2016 07:54 AM - edited 12-20-2016 07:56 AM
Hi Bob,
the problem is not the basic data read operation from an excel sheet - it's the additional Find operation in this special instance of the polymorphic GetXL_CellValues VI! Other instances just read the data without searching a range first…
That's why I told the OP to do some VBA debugging of the code (s)he tries to use…
(Also the OP seems to be limited to LV2012/2013, when the RGT wasn't included for free.)
12-20-2016 07:56 AM
Can you please help me do it in version 8.5.1 without using the RGT. I need it urgently ! I have posted the Vi i am trying to use.
12-20-2016 07:59 AM - edited 12-20-2016 08:04 AM
Hi sharmasargam,
please keep discussion in one thread, avoid double posts on the same problem!
(I moved your other message and Bob's answer into this thread!)
Can you please help me do it in version 8.5.1 without using the RGT. I need it urgently ! I have posted the Vi i am trying to use.
You got a lot of answers so far!
Did you do some debugging of the code you want to use, also in Excel VBA?
On your last VI upload:
This one runs fine. I really don't know why you want to read a Range "Select" and some "Cells" properties…
12-20-2016 08:06 AM
Yes i tried but i cudnt really fix it.
I tried using another Vi now. But it gives error message code -2146827284
"Exception occured in Microsoft Excel: Select method of Range class failedHelp Path is xlmain11.chm and context 0 in Excel Get Data Specified Field.vi".
I posted this Vi and error code screen shot as a separate question in the thread u merged
12-20-2016 08:17 AM
I will try to do it by deleting the select option.
Actually i want to look for a value in a column. Then corresponding to the row address of this value.
Read values from other columns.
Since i am not very good LabVIEW i might ne mixing things.