XLS exported from Numbers prints warning #9

Closed
mperham opened this Issue Sep 27, 2012 · 5 comments

Comments

Projects
None yet
2 participants

mperham commented Sep 27, 2012

[16:23:42 /Users/mperham/.rvm/gems/ruby-1.9.3-p125@theclymb3/gems/ruby-ole-1.2.11.4/lib/ole/storage/base.rb:395:validate!]
WARN   may not be a valid OLE2 structured storage file

We have an XLS fixture in our test suite. I opened it in Numbers, edited a header and exported it back out as XLS. The filesize changed from 45k -> 15k and now I see the warning message. All of our tests still pass so it seems like there's no problem reading the new file.

Owner

aquasync commented Sep 28, 2012

Can you upload the file somewhere so I can see what is causing the warning?

mperham commented Sep 28, 2012

If you put your email here or in your profile, I'd be happy to email it.

Owner

aquasync commented Sep 28, 2012

The warning is because ole.header.mbat_start == AllocationTable::AVAIL instead of AllocationTable::EOC (End-of-chain).

It appears Numbers is not following the spec (cf windowscompoundbinaryfileformatspecification.pdf, where that field is named _sectDifStart); you can see on page 6 it should be 0xfffffffe when there is no DIF. It works anyway, because when _csectDIF is 0 it doesn't try to read the chain.

The warning was intended to catch the case where there the count field is zero but a real chain entry is provided. AVAIL is harmless and can be ignored along with EOC.

In the meantime you may want to just set Ole::Log.level to Logger::ERROR to ignore.

Owner

aquasync commented Nov 6, 2012

I just released 1.2.11.5 which won't emit a warning for this case.

@aquasync aquasync closed this Nov 6, 2012

scottwillson added a commit to scottwillson/ruby-ole that referenced this issue Jul 28, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment