Skip to content

Commit

Permalink
fix #286
Browse files Browse the repository at this point in the history
  • Loading branch information
dilshod committed Oct 8, 2024
1 parent 76568f7 commit e352039
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion xlsx2csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@
48: '##0.0e+0',
49: '@',
}
EXCEL_ERROR_VALUES = [
'#N/A', '#REF!', '#DIV/0!', '#CALC!', '#NAME!', '#NULL!', '#NUM!', '#SPILL!', '#VALUE!'
]
CONTENT_TYPES = set((
'shared_strings',
'styles',
Expand Down Expand Up @@ -862,7 +865,7 @@ def handleCharData(self, data):
elif self.colType == "n":
format_type = "float"

if format_type and not format_type in self.ignore_formats and self.data != "#N/A":
if format_type and not format_type in self.ignore_formats and self.data not in EXCEL_ERROR_VALUES:
try:
if format_type == 'date': # date/time
if self.workbook.date1904:
Expand Down

0 comments on commit e352039

Please sign in to comment.