velofrog / readxlsb

Import Excel binary (.xlsb) spreadsheets into R
19 stars 2 forks source link

Some magic numbers will not be read #2

Closed Viperace closed 4 years ago

Viperace commented 4 years ago

When reading these specific numbers inside an xlsb file, the code will erroneously read as other values

524.475 524475 534475

They will be read as 2722629.08 , 0 and 0 respectively Try creating a test.xlsb file and write these numbers into it, then read in R.

read_xlsb('test.xlsb', sheet = 'Sheet1', range = 'A1:A3', col_names = T, col_types = 'string')

AtroXWorf commented 4 years ago

I have the same problem. With a xlsb and "col" in A1 and "-663530" in A2, I get with readxlsb::read_xlsb the folloing output:

    col

810094581

It does not matter wether one declares a col_type or not.

velofrog commented 4 years ago

Fixed error in StreamReader::RkNumber's integer test.