I've encountered a peculiar problem and can't find a good fix. In short, I'm running surveys, exporting the data to excel, and then appending to my stata master file on a regular basis using insheet or the import function (I'm using stata 12). I do this on a weekly basis and have had no problems. Until now. I just installed office365 and was greeting with the following message when I tried to import the latest excel file:
Unable to load excel file
Error: Mandatory element missing
A quick google search shows that a few other people have had this issue, but no one reports a fix.
No problem, I though, I'll either save as a comma delineated file or copy and paste into data editor. Both get the data into stata, but both have the same problem -- when I specify that the first line of data should be saved as variable names, all of the variables names are changed to lower case. In my original data set, first letter of variables are capitalized, the rest is lower case (ex: Bio1). This means that I can't append the data sets, because the variable names don't match (stata saves Bio1 as bio1).
I have several hundred columns (due to the way qualtrics handles survey experiments and randomization), so renaming each variable by hand would take a long really long time, and I'd need to do it each time I import new data. So, two questions:
1. Any idea why I can't import the excel file properly anymore? I can't find an explanation for the problem either.
2. Any idea how I can import the data manually (copy and paste or csv), but keep stata from changing the variable names to all lower case?
Really appreciate any help! I'm far away from the office at the moment, so there are no doors for me to knock on!
I have been running into the same problem. You could fix this by saving the excel-files that you want to upload as an Excel 97-2003 Workbook. This way, Stata did not run the error anymore. I hope this works for you, too!