cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

READEXCEL function returns wrong cell value

MikeMcDermott
7-Bedrock

READEXCEL function returns wrong cell value

I get a cell 1 down from what I specify. This is constant in MC11.2, MC15 and Prime 2.

I'll attach samples of all 3 versions.

12 REPLIES 12

I haven't got Mathcad at the moment but I've heard of a similiar issue before.

I you using Origin = 0?

Mike

I have origin set to 0 and setting it to 1 makes no difference.

Your correct Origin has no bearing on the component, but I'm sure Excel components have Origin = 1 built in.

Mike

Mike Armstrong wrote:

I haven't got Mathcad at the moment...

Mike,

Please see the attachment.

Pic_1.png

Cheers Valdimir,

I have definately come across this issue before with Raiko, I'm sure of it. When I have time I'll try and dig the thread out.

Mike

One note - If you add an entry in the B1 cell the readexcel gives the correct result.

It works the same for mathcad 15 & prime2 so the same bug probably exists in both.

Andy

Andy and Mike,


I see the same thing you do for XLS files (Excel 2003). READEXCEL works correctly for XLSX files (Excel 2007 and Excel 2010.(

If I add an entry to B1 in the XLS file, Mathcad grabs the correct cell, if B1 is empty, then it grabs the value one cell down.


I'll log this if it is not logged already.

Thanks,

Mona

Mona,

I'm not sure if the issue has been logged. The thread I previously came across this issue was one of Raiko's threads using scripted components.

Mike

I'm still investigating. I can repeat Mike's issue in his worksheet, but if I make a new XLS file, it works correctly.

Mona

Very strange. I'll look for the thread I was referring to as I'm sure that way the case last time.

Mike

mzeftel
12-Amethyst
(To:mzeftel)

Mike McDermott

I have been chasing why your spreadsheet doesn't work for READEXCEL. I deleted your top empty row in the Excel sheet, then replaced it with a new blank row, and everything is now working correctly.

So something was in your original Excel sheet that caused the problem. Let me know if you still have the issue.


Mona

So something was in your original Excel sheet that caused the problem. Let me know if you still have the issue.

I remember the Excel sheet I was dealing with had alot of data in multiple cells and a little untidy. But should this have an issue?

Mike

Announcements

Top Tags