Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Exporting data to excel' topicStudent Support Forum > General > "Exporting data to excel"

< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic
Author Comment/Response
Bill Simpson
04/12/13 1:57pm

In[1]:= data = Import["3dstars.jpg"];
rgb = ImageData[dati];
Dimensions[rgb]

Out[3]= {512, 512, 3}

In[4]:= Export["rgb.xls", rgb]

During evaluation of In[4]:= Export::nojmem: There was insufficient Java heap space for the operation. Try increasing the Java Virtual Machine heap size. >>

Out[4]= $Failed

In[5]:= Export["rgb.xlsx", rgb]

During evaluation of In[5]:= Export::nojmem: There was insufficient Java heap space for the operation. Try increasing the Java Virtual Machine heap size. >>

Out[5]= $Failed

In[6]:= red = rgb /. {r_, _, _} -> r;
Dimensions[red]

Out[7]= {512, 512}

In[8]:= Export["red.xls", red]

During evaluation of In[8]:= Export::toomany3: Cannot export to XLS. The number of columns exceeds the limit of this format. >>

Out[8]= $Failed

In[9]:= Export["red.xlsx", red]

During evaluation of In[9]:= Export::toomany3: Cannot export to XLSX. The number of columns exceeds the limit of this format. >>

Out[9]= $Failed

In[10]:= Export["rgb.csv", rgb]

Out[10]= "rgb.csv"

In[11]:= Export["red.csv", red]

Out[11]= "red.csv"

If you Google for the toomany error message (in quotes) you can find
http://mathematica.stackexchange.com/questions/20905/exporting-a-xlsx-file-with-about-500-columns
explaining that MMA 8 and 9 do not support the extended limits on the number of columns in Excel 2007, 2010, 2013, ... but that using .csv format ignores those limits and appears to allow you to handle your image file.

I don't know whether the {r,g,b} list form of each pixel of your image will work with Excel but as I showed you can extract individual colors or even combine all three colors into a single number that would then be accepted by Excel.

URL: ,

Subject (listing for 'Exporting data to excel')
Author Date Posted
Exporting data to excel Sameer 04/11/13 3:27pm
Re: Exporting data to excel Bill Simpson 04/12/13 1:57pm
Re: Re: Exporting data to excel Forum Modera... 04/12/13 4:42pm
Re: Re: Exporting data to excel Sameer 04/16/13 8:18pm
< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic