Menu

#59 Unable to open XLS files save by xlsLib using MS Office IFilter (Windows search)

v1.0_(example)
open
nobody
None
5
2017-12-12
2017-12-07
No

Hello,
I want to report this issue, because all the files created by this library I tested failed to open by MS Office IFilter. Excel opens it fine.

For example I used test file exported from testcases (testC.xls attached).
IFilters for MS Office are installed either by any MS Office installation or by "Microsoft Office 2010 Filter Pack + update SP2" (OFFFILT.DLL attached).

I used official app installed with Visual Studio for IFilter testing from MS (filtdump.exe attached).

C:\Program Files (x86)\Windows Kits\10\bin\x64>filtdump.exe "C:\test\testC.xls"
FILE: C:\test\testC.xls
IFILTER: CLSID == {64F1276A-7A68-4190-882C-5F14B7852019}
IFILTER: Using IPersistStream
IFILTER: IPersistStream->Load failed, hr == 0x8004170c
LoadIFilterWrapper failed, hr == 0x8004170c
FILTDUMP failed, hr == 0x8004170c

Thx.

PP

3 Attachments

Discussion

  • David Hoerl

    David Hoerl - 2017-12-08

    I don't know what I can do about this. There are literally thousands of options in an xls file. There is an ordering of those objects too. Probably some minor detail is different and IFilter notices that and fails.

    If you could ever find someone at MS to tell you specifically WHY the file fails to open, we might be able to do something about it. Otherwise, as you can see from the number of downloads, thousands of people use the library without any problem.

     
  • Petr Pospíšil

    Petr Pospíšil - 2017-12-12

    I did some research. I was able to debug and compare working and not working files to find out differences. The reason IFilter fails on XlsLib files is that IStorage::Stat does not fill CLSID as {00020820-0000-0000-c000-000000000046}, but leaves it NULL. See screenshots.

    Minimal reproduction sample:

    HRESULT hr = S_OK;
        IStorage *pStg = NULL;
    
        hr = StgOpenStorageEx(rgwszArgs[1],
            STGM_READ | STGM_SHARE_DENY_WRITE,
            STGFMT_ANY,
            0,
            NULL,
            NULL,
            IID_IStorage,
            reinterpret_cast<void**>(&pStg));
    
        STATSTG stat = {};
        hr = pStg->Stat(&stat, STATFLAG_DEFAULT);
    
        pStg->Release();
    
     

Log in to post a comment.