title: select data from excel and save it as a variable
body: <p>I have an excel file which has few rows of string followed by data, I have to select data column wise and save it as a variable. I have tried using openpyxl module, and I have given the code that I am working below. I am able to print the variable nm and count inside loop, but outside loop only one value of the variable (nm, count) will be printed: I need to use these variables to do basic arthamatic operation such as averaging and subtraction later before I plot them. Hence, I need to have them as a variable for my convinence, and I need help in this regard.</p>
  <pre><code>wb = openpyxl.load_workbook(filename='C:/Users/experiment 1//S01/S_D_Sp1_S01.xlsx')
  a_sheet_names = wb.get_sheet_names()
  print(a_sheet_names)
  ws=wb.active
  lamda=ws['A6:A17']
  intensity=ws['B6:B17'] 
  
  #loop
  
  for x in lamda:
      for nm in x:
          print(nm.value)
  
  for y in intensity:
      for counts in y:
          print(counts.value)
  
  print (nm,counts)
  </code></pre>