3

How to export data from excel specific cells into Mathematica? Given that the spreadsheet tab is named XYZ and that I have several cells at various locations in the same column in Excel that I want to export?

m_goldberg
  • 107,779
  • 16
  • 103
  • 257
sebastian c.
  • 1,973
  • 2
  • 18
  • 27

1 Answers1

4

This is verbatim from the docs on XLSX:

Example excel file with two sheets:

 Export["sheets.xlsx", {{"MySheet1" -> {Range[10]}, 
   "MySheet2" -> {{"This is a string."}}}}, {{"Sheets"}}]

To import the cell at row 1, column 4 of MySheet1:

 Import["sheets.xlsx", {"Sheets", "MySheet1", 1, 4}]
 (*  4 *)

Import the second sheet:

 Import["sheets.xlsx", {"Sheets", 2}]
 (* {{"This is a string."}} *)
kglr
  • 394,356
  • 18
  • 477
  • 896