Excel 3.0

Sep 9, 2009 at 2:35 PM

Hi -  I'm trying to read Excel 3.0 files from an old system (I know right!) and auto convert them (or save as...) to an Excel 97-2003 format.

Can NPOI read Excel 3.0?  When I attempt an open I get:

"Invalid header signature; Read 4503599627764233, expected -2226271756974174256"

Using this code:

        Dim workbook As NPOI.HSSF.UserModel.HSSFWorkbook
        Dim fs As System.IO.FileStream
        Dim worksheet As NPOI.HSSF.UserModel.HSSFSheet

            fs = New System.IO.FileStream("C:\aaa\WMDownloads\AllTitles.xls", IO.FileMode.Open, IO.FileAccess.ReadWrite)

            workbook = New NPOI.HSSF.UserModel.HSSFWorkbook(fs)   ' ERRORS HERE
            worksheet = workbook.GetSheetAt(0)

        Catch ex As Exception

            If Not (fs Is Nothing) Then
                fs = Nothing
            End If

        End Try

Sep 10, 2009 at 2:35 AM

I'm a bit surprised to hear that. No test are done on xls files converted from Excel 3.0 format. According to the exception "Invalid header signature", it seems that the header in your file is not supported in NPOI. The header indicates that which version of Excel writes this file. Can you share the file with me? Pls send it to tonyqus(at) gmail.com. I'll research the file.

Apr 21, 2010 at 9:42 PM

Was a solution found for this?  I am having the same problem.