From: Benfeitas on 12 Nov 2009 06:04 Hi! I'm trying to import a small table (2 columns and 15 lines) into mathematica, but for some reason I'm not able to do it... Here's the code Im trying: In[1]:= Path1 = "C:\\Documents and Settings\\Ankit\\Desktop\\Book1.xlsx"; Import[Path1, "Elements"] Out[2]= {"FileNames"} In[5]:= Import[Path1] Out[5]= {"[Content_Types].xml", "_rels\\.rels", \ "xl\\_rels\\workbook.xml.rels", "xl\\workbook.xml", \ "xl\\theme\\theme1.xml", "xl\\worksheets\\_rels\\sheet1.xml.rels", \ "xl\\worksheets\\sheet2.xml", "xl\\worksheets\\sheet3.xml", \ "xl\\worksheets\\sheet1.xml", "xl\\sharedStrings.xml", \ "xl\\styles.xml", "xl\\printerSettings\\printerSettings1.bin", \ "docProps\\core.xml", "docProps\\app.xml"} In[6]:= Take[Import[Path1, 15]] // TableForm During evaluation of In[6]:= Import::noelem: The Import element "15" is not present when importing as ZIP. >> Out[6]//TableForm= \!\(\* TagBox["$Failed", Function[BoxForm`e$, TableForm[BoxForm`e$]]]\) Why isn't it outputting the table that i had in excel? Thanks a lot for all the help
From: Helen Read on 13 Nov 2009 05:53 Benfeitas wrote: > Hi! > I'm trying to import a small table (2 columns and 15 lines) into > mathematica, but for some reason I'm not able to do it... > > Here's the code Im trying: > > Path1 = > "C:\\Documents and Settings\\Ankit\\Desktop\\Book1.xlsx"; > Import[Path1, "Elements"] Try saving your Excel file in the backward compatible .xls format. A simple Import[path] will then work. -- Helen Read University of Vermont
From: Sjoerd C. de Vries on 13 Nov 2009 05:55 As far as I know, Mathematica does not import the Excel 2007 XLSX format but only the 98-2003 XLS format. So, try converting your file in Excel to XLS. Cheers -- Sjoerd On Nov 12, 1:04 pm, Benfeitas <rui.benfei...(a)gmail.com> wrote: > Hi! > I'm trying to import a small table (2 columns and 15 lines) into > mathematica, but for some reason I'm not able to do it... > > Here's the code Im trying: > > In[1]:= Path1 = > "C:\\Documents and Settings\\Ankit\\Desktop\\Book1.xlsx"; > Import[Path1, "Elements"] > Out[2]= {"FileNames"} > > In[5]:= Import[Path1] > Out[5]= {"[Content_Types].xml", "_rels\\.rels", \ > "xl\\_rels\\workbook.xml.rels", "xl\\workbook.xml", \ > "xl\\theme\\theme1.xml", "xl\\worksheets\\_rels\\sheet1.xml.rels", \ > "xl\\worksheets\\sheet2.xml", "xl\\worksheets\\sheet3.xml", \ > "xl\\worksheets\\sheet1.xml", "xl\\sharedStrings.xml", \ > "xl\\styles.xml", "xl\\printerSettings\\printerSettings1.bin", \ > "docProps\\core.xml", "docProps\\app.xml"} > > In[6]:= Take[Import[Path1, 15]] // TableForm > During evaluation of In[6]:= Import::noelem: The Import element "15" > is not present when importing as ZIP. >> > > Out[6]//TableForm= \!\(\* > TagBox["$Failed", > Function[BoxForm`e$, > TableForm[BoxForm`e$]]]\) > > Why isn't it outputting the table that i had in excel? > > Thanks a lot for all the help
|
Pages: 1 Prev: NonlinearModelFit on correlated data Next: mixed ByteOrdering |