0

Is there a way for me to read strikethroughs in Pandas without resorting to VBA? I have a spreadsheet where a person refuses to use anything else.

BlueSun
  • 3,495
  • 1
  • 17
  • 34
Andy Do
  • 89
  • 1
  • 1
  • 12

1 Answers1

3

This isn't possible in Pandas but would be using xlrd. You could first parse for formatting and then turn that into a Pandas dataframe.

Sample code to read a file using xlrd. Adapted the response to a similar question:

import xlrd.open_workbook

workbook = xlrd.open_workbook('tmp.xls', formatting_info=True)
sheet = wb.sheet_by_name("1")
cell = sheet.cell(6, 0)
format = wb.xf_list[cell.xf_index]
print "type(format) is", type(format)
print
print "format.dump():"
format.dump()
Community
  • 1
  • 1
saladi
  • 2,784
  • 5
  • 28
  • 58