-2

I have to read an Excel file Using python. By the time I use

xl = pd.ExcelFile("abc.xlsx")

The column values which had hyperlink assigned to it becomes a simple number without any hyperlink.

Is there any way that I can retain the Hyperlink?

Details below.

enter image description here

Ishan
  • 61
  • 3
  • 10
  • Obviously you use `pandas` for reading in data from an excel sheet - and the data content is '123', 'abc' and so on. If you want to get more information about the internals of the file, you should use an Excel reader/writer-library like openpyxl or xlrd. – SpghttCd Aug 21 '18 at 09:05
  • Possible duplicate of [Extracting Hyperlinks From Excel (.xlsx) with Python](https://stackoverflow.com/questions/16676727/extracting-hyperlinks-from-excel-xlsx-with-python) – SpghttCd Aug 21 '18 at 09:07

1 Answers1

1

Pandas library does not have the functionality to parse hyperlink as of yet. You could preprocess the excel using libraries such as xlrd or openpxyl to get hyperlinks then use it in pandas.

Source: https://stackoverflow.com/a/45446810/7570485

There is also a feature request for this functionality.

https://github.com/pandas-dev/pandas/issues/13439

Xnkr
  • 564
  • 5
  • 16
  • This Solution gives me the perfect output but I am not getting the details for all the Hyperlinks. I am looking into that. But I have got the logic. Thank you for your help. – Ishan Aug 23 '18 at 04:28