Reputation: 21
I am using xlwings and I have a problem.
Like above a image, My data has a empty value of first cell.
when I try to read that column...I have all NaN values...like below..
Resolution Type
NaN
NaN
NaN
NaN
This is my code..
sheet.range('G1').options(pd.DataFrame, index=False, expand='table', headers=True).value
I want to my original data..
what should I do?
Upvotes: 2
Views: 1583
Reputation: 1933
use used_range:
import xlwings as xw
filepath = r"a_file.xlsx"
wb = xw.Book(filepath)
sheet = wb.sheets[0]
print(sheet.used_range)
Upvotes: 1