Created
January 26, 2019 06:11
-
-
Save Elfsong/9c9fae3c3f6a244691bc6d8b81a980de to your computer and use it in GitHub Desktop.
Excel Reader #spreadsheet #python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import xlrd | |
ROOT_PATH = r"C:\Users\t-midu\PycharmProjects\Scenario" | |
RESOURCE_PATH = os.path.join(ROOT_PATH, "resource") | |
file_path = os.path.join(RESOURCE_PATH, "sentence_class.xls") | |
data = xlrd.open_workbook(file_path) | |
table = data.sheet_by_name('label') | |
nrows = table.nrows | |
for line in range(15, nrows): | |
print(table.row_values(line)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment