Mathematica 9 is now available
Student Support Forum
Student Support Forum: 'problem with .xlsx import' topicStudent Support Forum > General > Archives > "problem with .xlsx import"

Next Comment >Help | Reply To Topic
Author Comment/Response
04/04/12 04:55am

when I import an Excel file containing 2 columns of numeric data (to be used for a regression analysis later), each numeric value has a special character (looking like a French accent) attached to it.

I use Import, without options:
data = Import["gdp_inflation.xlsx"]

At first glance data looks fine, except the additional {} perhaps:

{{{6.59, 3.57}, {4.08, 1.68}, ... , {4.94, 2.16}}}

lm = LinearModelFit[data, x, x]

fails, because data doesn't seem to be clean. This can be seen when I assign the Import output to a variable:

a = {{{6.59`, 3.57`}, {4.08`, 1.68`}, ...

I can manually remove the offending character, which works. But there must be a better way, surely. The .xlsx file is attached, just in case you wish to try.

Any ideas? Thanks so much in advance.

And, yes: I am very much a beginner

Attachment: gdp_inflation.xlsx, URL: ,

Subject (listing for 'problem with .xlsx import')
Author Date Posted
problem with .xlsx import leo 04/04/12 04:55am
Re: problem with .xlsx import S. Saralamba 04/05/12 00:27am
Re: problem with .xlsx import Meriens 04/05/12 03:32am
Re: Re: problem with .xlsx import leo 04/05/12 3:12pm
Next Comment >Help | Reply To Topic