dhoerl / DHlibxls

Framework to read Excel xls spreadsheets
271 stars 86 forks source link

xlsReaderFromFile return nil #1

Closed SuiFeng closed 12 years ago

SuiFeng commented 12 years ago

Assertion failed: (reader), function -[ViewController viewDidLoad],

stop in: if (!(pWB->olestr=ole2_fopen(ole,(BYTE )"Workbook")) && !(pWB->olestr=ole2_fopen(ole,(BYTE )"Book")))

dhoerl commented 12 years ago

What I need is a test file - if you can upload one here somewhere (attach a file to this issue?) otherwise email it to me dhoerl at mac dot com. Just send any file that causes this error.

SuiFeng commented 12 years ago

Thanks a lot. Now I run successfully, is it run only in device?

dhoerl commented 12 years ago

It has been tested on both simulator and device. The most likely failure is not providing a proper path to the file. So make sure the file exists and is readable.

SuiFeng commented 12 years ago

But I can't run TestDHlibxls in simulator, failed in DHxlsReader *reader = [DHxlsReader xlsReaderFromFile:path]; return nil;

I only rename config.h.in to config.h

SuiFeng commented 12 years ago

Also can't run in device now...

SuiFeng commented 12 years ago

failed in :

if (!(pWB->olestr=ole2_fopen(ole,(BYTE )"Workbook")) && !(pWB->olestr=ole2_fopen(ole,(BYTE )"Book")))

dhoerl commented 12 years ago

Well, good news and bad news. I got the project to work with my file - there was some confusion on my part about config.h, so its now apart of the project. I uploaded a new project file and that file. I then tested by pulling the project into /tmp and verifying it would build and run.

When I use your demo file I get a crash but the file does open correctly. Probably the config.h.in is not correct for iOS.

I'll track down the current problem and tell you when its fixed.

dhoerl commented 12 years ago

OK - I fixed the problem. The new source is uploaded to github. The framework tried to convert some null strings - that was the problem.

SuiFeng commented 12 years ago

ok thanks a lot.