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,541
  • 1
  • 18
  • 37
Andy Do
  • 99
  • 1
  • 2
  • 14

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
  • 3,103
  • 6
  • 36
  • 61