Monday, 15 August 2011

Getting the URL from Excel Sheet Hyper links in Python with xlrd -



Getting the URL from Excel Sheet Hyper links in Python with xlrd -

i trying hyperlinks url of elements in 2nd column of excel sheet using xlrd. when using:

book = open_workbook('mypath', formatting_info=true) sheet = book.sheet_by_index(0) r_sheet = book.sheet_by_index(0) wb = copy(book) w_sheet = wb.get_sheet(0) row_index in range(1, sheet.nrows): url = sheet.hyperlink_map.get((row_index, 1)) print url

i get:

<xlrd.sheet.hyperlink object @ 0x0000000002d81898> <xlrd.sheet.hyperlink object @ 0x0000000002d819e8> <xlrd.sheet.hyperlink object @ 0x0000000002d81da0>

what have add together code url formatted in string format , not xlrd.sheet.hyperlink object can later used in code? looking actual url see when highlighting elements of first column in excel, http://www.mywebpage.com

python excel hyperlink xlrd

No comments:

Post a Comment