我试图在电子表格中循环并获取某一列下某行中单元格的值,如下所示:
# Row by row, go through the originalWorkSheet and save the values from the selected columns
numberOfRowsInOriginalWorkSheet = originalWorkSheet.nrows - 1
rowCounter = 0
while rowCounter <= numberOfRowsInOriginalWorkSheet:
row = originalWorkSheet.row(rowCounter)
#Grab the values in certain columns, say with the
# column name "Promotion" and save them to a variable
这可能吗?我的googlefoo在这一点上让我失败了。 谢谢你的帮助!
最简单的方法是:
或者可以循环行列表并打印每个单元格值
^{pr2}$希望这有帮助
有很多方法可以做到这一点,看看docs
像这样:
将为您提供“促销”列中的值列表
相关问题 更多 >
编程相关推荐