764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
|
# File 'lib/spreadsheet/excel/reader.rb', line 764
def read_workbook
worksheet = nil
previous_op = nil
while tuple = get_next_chunk
pos, op, len, work = tuple
case op
when @bof, :bof
return
when :eof
postread_workbook
return
when :datemode
flag, _ = work.unpack 'v'
if flag == 1
@workbook.date_base = DateTime.new 1904, 1, 1
else
@workbook.date_base = DateTime.new 1899, 12, 31
end
when :continue
case previous_op
when :sst
continue_sst work, pos, len
end
when :codepage
read_codepage work, pos, len
when :boundsheet
read_boundsheet work, pos, len
when :xf
read_xf work, pos, len
when :sst
read_sst work, pos, len
when :extsst
read_extsst work, pos, len
when :style
read_style work, pos, len
when :format
read_format work, pos, len
when :font
read_font work, pos, len
end
previous_op = op unless op == :continue
end
end
|