Data format AFTER import into Mathematica from Excel.xls worksheet

Click For Summary
SUMMARY

Mathematica does not automatically recognize column titles from an imported Excel worksheet, which can hinder the creation of contour plots. Users must ensure that their data is formatted correctly for Mathematica to utilize named columns effectively. It is recommended to save the Excel file in the older .XLS format for compatibility. Providing a sample Excel sheet and a simplified Mathematica notebook can facilitate assistance from experienced users.

PREREQUISITES
  • Familiarity with Mathematica's data import functions
  • Understanding of Excel .XLS file format
  • Basic knowledge of contour plotting in Mathematica
  • Ability to create and manipulate Mathematica notebooks
NEXT STEPS
  • Learn how to use Mathematica's Import function effectively
  • Explore data formatting techniques for Excel to ensure compatibility with Mathematica
  • Study the SmoothDensityHistogram function in Mathematica for contour plotting
  • Review best practices for sharing Mathematica notebooks for collaborative troubleshooting
USEFUL FOR

This discussion is beneficial for data analysts, researchers, and anyone using Mathematica for data visualization, particularly those transitioning data from Excel to Mathematica for advanced plotting tasks.

nkormanik
Messages
1
Reaction score
0
.
I have a large Excel worksheet (200 columns, 4,000 rows). Every column has a unique and carefully chosen title/label.

I'm attempting to use it within Mathematica to create a large number of contour plots (1,000) -- using three columns at a time, for x, y, z.

The import, I suppose, occurs. At least it appears to have.

Here's the question:

-- Is Mathematica using my column titles, so that I can refer to them in commands subsequent to import?

-- If not, is there any format I can put my data into to begin with so that Mathematica will readily recognize my named columns?


I certainly wanted to be getting on with the contour plots (SmoothDensityHistogram), but am having trouble getting my data into the required form.

Any help appreciated.

Nicholas Kormanik
nkormanik@gmail.com

.
 
Physics news on Phys.org
Mathematica is very likely not using your Excel column titles, but we cannot see your code so we cannot be absolutely certain.

If you would be willing to generate a small sample Excel sheet (and save it in an old .XLS format rather than any of the newer formats that some of us don't have a version of Excel new enough to read) with the same number of columns and titles and perhaps half a dozen or a dozen rows

AND create a small simple version of your Mathematica notebook that shows how you are currently importing your Excel sheet and how you would like to refer to your Excel column names when using the data in a contour plot and describes as clearly as possible what you want to see. If you want to generate thousands of contour plots then this should probably include just enough information so that someone can understand how the notebook needs to be able to do that. These last parts don't necessarily need to work, but they need to communicate clearly enough that someone with Mathematica experience can understand what they need to write for you.

THEN someone might be able to take a few minutes and see if they can find a way to fiddle the notebook contents to make it do what you want.
 

Similar threads

  • · Replies 18 ·
Replies
18
Views
5K
  • · Replies 6 ·
Replies
6
Views
5K
  • · Replies 2 ·
Replies
2
Views
5K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
10K
  • · Replies 3 ·
Replies
3
Views
5K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 2 ·
Replies
2
Views
1K