I have sheets 100A-100G in Excel with data I want to plot in columns E and H of every sheet. Is there a way I can take the data from each sheet and plot into a separate graph in a simple way through Mathematica?

Thank you for the help!


1 Answer 1


Create an excel workbook with three sheets:

{data1, data2, data3} = RandomInteger[100, {3, 10, 20}];

Export["data123.xlsx", "Sheets" -> {"data 1" -> data1, "data 2" -> data2, 
   "data 3" -> data3}, "Rules"]

enter image description here

Import columns 5 and 8 from all sheets:

importedcolumns58 = Import["data123.xlsx",
   {"Data", All (* sheets *), All (* rows *), (* and columns *) {5, 8}}];

Plot the imported data:

ListLinePlot[SortBy[First] /@ importedcolumns58, 
 PlotLegends -> {"data1", "data2", "data3"}]

enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.