# Odd problem with Module

I've been having a strange problem with Module. Oddly it seems to be linked to my use of Import and then applying a function such as Flatten to my Import. I pasted images of my code and output because there also seems to be an issues with regard to the cells that the code is in. I'm using 64 bit version 10.0.1.0.

Now I apply Flatten to inputData:

Oddly, if I put the statement inputData in the first cell, then everything works.

If I go back to my second set of code, but remove the Module, then again everything works.

The spreadsheet is just 4 rows, as you see in the output. This is simplified from the actual problem I'm working on. It seems that Mathematica is not making the assignment to inputData, but rather somehow keeping it linked to the Import statement until the end of the Module.

• Really weird. This behavior doesn't exist if you input the entire file path into the Import function (C:\\Users\\username\\test1.xlsx). – kale Oct 13 '14 at 17:45
• Could you please insert FullForm@inputData before the Flatten? – Dr. belisarius Oct 13 '14 at 17:47
• @kale I tried that in my full version and sometimes it worked and other times it didn't. But that was getting so complicated that I can't be sure that I repeated my steps accurately. – Mitchell Kaplan Oct 13 '14 at 17:49
• Even weirder, if you place Trace around the x = Flatten[inputData];, all values seem to be assigned correctly. Otherwise x still equals Flatten[\$Failed]. – kale Oct 13 '14 at 17:50
• If you have the Suggestions Bar turned on, does it make any difference if you turn it off? There have been reports of the Suggestions Bar mangling output. – WReach Oct 14 '14 at 16:31