Find if a value exists in a column in Excel using python

前端 未结 3 1714
萌比男神i
萌比男神i 2020-12-18 13:50

I have an Excel file with one worksheet that has sediment collection data. I am running a long Python script.

In the worksheet is a column titled “CollectionYear.”

3条回答
  •  独厮守ぢ
    2020-12-18 14:28

    Try using xlwings library to interface with Excel from python

    example from their docs:

    from xlwings import Workbook, Sheet, Range, Chart
    wb = Workbook()  # Creates a connection with a new workbook
    Range('A1').value = 'Foo 1'
    Range('A1').value
    >>> 'Foo 1'
    Range('A1').value = [['Foo 1', 'Foo 2', 'Foo 3'], [10.0, 20.0, 30.0]]
    

提交回复
热议问题