We're considering a Excel tool to import/export MS Excel file in our project. We've tested C1Excel, GemBox... but they all have some limitations so we prefer Spire XLS cause it supports almost features we need such as: rtf, cell indent, chart, textbox... But we've met some obstacles right at the 1st step: Spire XLS seems to be unstable when reading from Excel files (the rule here is able to read what MS Excel can read). I've attached here source code from our project and the sample Excel file, the case is reading from sample Excel file (very simple) to display on a grid control, in method BravoConverter.openXls(), I call Workbook.LoadFromFile() to load Excel file then scan each cell to write to grid in method BravoConverter.xlsToGrid(). The application will hang whenever accessing XlsRange.NumberFormat of some cells even I put it in try/catch block. Sometimes, it wont hang but some messages "A first chance exception of type 'System.Runtime.InteropServices.SafeArrayTypeMismatchException' occurred in System.Drawing.dll" occurs in Output window (you can REM all code involving our grid to exclude the grid's trouble). And occasionally, an exception will throw when accessing XlsRange.RichText.
Pls download the attachments then run in debug mode to see by yourself what I've mentioned above. Thank you!
P/S: sorry, I've only attach sample excel file here due to size limitation of the forum, for the testing source code, pls download from this link https://rapidshare.com/files/3707432060/BravoConverter.rar (I'm using VS2008).