Expand format recognition for dates

Read in and use DATEMODE (0x22), and recognize more formats as dates (both built-in and user-defined).
This commit is contained in:
Tams Gulcsi
2015-11-25 14:50:29 +01:00
parent 6130495e06
commit 80a9dc03c7
2 changed files with 45 additions and 25 deletions

View File

@@ -21,6 +21,7 @@ type WorkBook struct {
rs io.ReadSeeker
sst []string
continue_utf16 uint16
dateMode uint16
}
//read workbook from ole2 file
@@ -135,6 +136,8 @@ func (wb *WorkBook) parseBof(buf io.ReadSeeker, b *bof, pre *bof, offset_pre int
binary.Read(buf_item, binary.LittleEndian, &f.Head)
f.str = wb.get_string(buf_item, f.Head.Size)
wb.addFormat(f)
case 0x22: //DATEMODE
binary.Read(buf_item, binary.LittleEndian, &wb.dateMode)
}
return
}