Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:54:40) [MSC v.1900 64 bit (AMD64)] on win32
Type "copyright", "credits" or "license()" for more information.
import numpy
from openpyxl import load_workbook
##读取路径
wb = load_workbook(filename=r'D:\密闭取芯综合数据.xlsx')
##读取名字为Sheet1的sheet表
ws = wb.get_sheet_by_name("密闭取芯综合数据")
arr1 = []
arr2 = []
遍历第2行到10000行
for row_A in range(2, 10000):
## 遍历第2行到10000行,第1列
a1 = ws.cell(row=row_A, column=23).value
## 遍历第2行到10000行,第3列
a2 = ws.cell(row=row_A, column=24).value
if a1:
# 写入数组1
arr1.append(a1)
if a2:
# 写入数组2
arr2.append(a2)