Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
BIFF8 reader
Looking for VB code to read an .xls file as BIFF8.
Found code at Planet Source Code: http://devnull.at/?8QDSY But is has bugs and not managed yet to fix it. Would there be anybody on this forum who is willing to pass VB code (maybe the fixed code from PSC) that does this? Have posted to the VB6 group as well, but little reply from there. RBS |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
BIFF8 reader
I had a look at that and the first problem I found is the reading of the
worksheets; it does not seems stop and reads then more than once resulting in a index error trying to add duplicate names to the WS collection. I don't know enough about the BIFF to say how to correct, but you could may be hack a fix by checking for that error in cWorkBook.AddWorkSheet. Or simply ignore the error until you know the BIFF reason <g. 'Previous routine Public Sub AddWorkSheet(name) Dim NewWorkSheet As New cWorkSheet NewWorkSheet.name = name m_WorkSheet.Add NewWorkSheet, name Set NewWorkSheet.Parent = Me End Sub 'change to Public Function AddWorkSheet(name) As Boolean Dim NewWorkSheet As New cWorkSheet On Error GoTo Handler NewWorkSheet.name = name m_WorkSheet.Add NewWorkSheet, name Set NewWorkSheet.Parent = Me AddWorkSheet = True Exit Function Handler: Select Case Err.Number Case 457 AddWorkSheet = False Case Else 'Decide End Select End Function NickHK "RB Smissaert" wrote in message ... Looking for VB code to read an .xls file as BIFF8. Found code at Planet Source Code: http://devnull.at/?8QDSY But is has bugs and not managed yet to fix it. Would there be anybody on this forum who is willing to pass VB code (maybe the fixed code from PSC) that does this? Have posted to the VB6 group as well, but little reply from there. RBS |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
BIFF8 reader
Thanks for that. I have fixed a few things, but like you I am working a bit
in the dark as I don't know the BIFF format. I have the documentation, but I can't say it is simple. The main problem I am stuck with now is that it doesn't pick up the next cell if that cell holds an integer value and the previous cell on the same row held an integer as well. It would be nice to fix this as you can then quickly check a workbook without opening it. Haven't compared but I think it will be faster as well than using an Excel4Macro. RBS "NickHK" wrote in message ... I had a look at that and the first problem I found is the reading of the worksheets; it does not seems stop and reads then more than once resulting in a index error trying to add duplicate names to the WS collection. I don't know enough about the BIFF to say how to correct, but you could may be hack a fix by checking for that error in cWorkBook.AddWorkSheet. Or simply ignore the error until you know the BIFF reason <g. 'Previous routine Public Sub AddWorkSheet(name) Dim NewWorkSheet As New cWorkSheet NewWorkSheet.name = name m_WorkSheet.Add NewWorkSheet, name Set NewWorkSheet.Parent = Me End Sub 'change to Public Function AddWorkSheet(name) As Boolean Dim NewWorkSheet As New cWorkSheet On Error GoTo Handler NewWorkSheet.name = name m_WorkSheet.Add NewWorkSheet, name Set NewWorkSheet.Parent = Me AddWorkSheet = True Exit Function Handler: Select Case Err.Number Case 457 AddWorkSheet = False Case Else 'Decide End Select End Function NickHK "RB Smissaert" wrote in message ... Looking for VB code to read an .xls file as BIFF8. Found code at Planet Source Code: http://devnull.at/?8QDSY But is has bugs and not managed yet to fix it. Would there be anybody on this forum who is willing to pass VB code (maybe the fixed code from PSC) that does this? Have posted to the VB6 group as well, but little reply from there. RBS |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
BIFF8 reader
Yes, this certainly looks promising, but would involve a LOT more study on
my part to begin to correct some <any of the errors. I assume you have looked at ADO and decided it does not fit your requirements ? NickHK "RB Smissaert" wrote in message ... Thanks for that. I have fixed a few things, but like you I am working a bit in the dark as I don't know the BIFF format. I have the documentation, but I can't say it is simple. The main problem I am stuck with now is that it doesn't pick up the next cell if that cell holds an integer value and the previous cell on the same row held an integer as well. It would be nice to fix this as you can then quickly check a workbook without opening it. Haven't compared but I think it will be faster as well than using an Excel4Macro. RBS "NickHK" wrote in message ... I had a look at that and the first problem I found is the reading of the worksheets; it does not seems stop and reads then more than once resulting in a index error trying to add duplicate names to the WS collection. I don't know enough about the BIFF to say how to correct, but you could may be hack a fix by checking for that error in cWorkBook.AddWorkSheet. Or simply ignore the error until you know the BIFF reason <g. 'Previous routine Public Sub AddWorkSheet(name) Dim NewWorkSheet As New cWorkSheet NewWorkSheet.name = name m_WorkSheet.Add NewWorkSheet, name Set NewWorkSheet.Parent = Me End Sub 'change to Public Function AddWorkSheet(name) As Boolean Dim NewWorkSheet As New cWorkSheet On Error GoTo Handler NewWorkSheet.name = name m_WorkSheet.Add NewWorkSheet, name Set NewWorkSheet.Parent = Me AddWorkSheet = True Exit Function Handler: Select Case Err.Number Case 457 AddWorkSheet = False Case Else 'Decide End Select End Function NickHK "RB Smissaert" wrote in message ... Looking for VB code to read an .xls file as BIFF8. Found code at Planet Source Code: http://devnull.at/?8QDSY But is has bugs and not managed yet to fix it. Would there be anybody on this forum who is willing to pass VB code (maybe the fixed code from PSC) that does this? Have posted to the VB6 group as well, but little reply from there. RBS |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
BIFF8 reader
I have no particular requirement, but I thought it would be useful to have
this option available. The quoted VB code also kind of looks interesting. ADO will be fine, but it will be slower than reading as BIFF. RBS "NickHK" wrote in message ... Yes, this certainly looks promising, but would involve a LOT more study on my part to begin to correct some <any of the errors. I assume you have looked at ADO and decided it does not fit your requirements ? NickHK "RB Smissaert" wrote in message ... Thanks for that. I have fixed a few things, but like you I am working a bit in the dark as I don't know the BIFF format. I have the documentation, but I can't say it is simple. The main problem I am stuck with now is that it doesn't pick up the next cell if that cell holds an integer value and the previous cell on the same row held an integer as well. It would be nice to fix this as you can then quickly check a workbook without opening it. Haven't compared but I think it will be faster as well than using an Excel4Macro. RBS "NickHK" wrote in message ... I had a look at that and the first problem I found is the reading of the worksheets; it does not seems stop and reads then more than once resulting in a index error trying to add duplicate names to the WS collection. I don't know enough about the BIFF to say how to correct, but you could may be hack a fix by checking for that error in cWorkBook.AddWorkSheet. Or simply ignore the error until you know the BIFF reason <g. 'Previous routine Public Sub AddWorkSheet(name) Dim NewWorkSheet As New cWorkSheet NewWorkSheet.name = name m_WorkSheet.Add NewWorkSheet, name Set NewWorkSheet.Parent = Me End Sub 'change to Public Function AddWorkSheet(name) As Boolean Dim NewWorkSheet As New cWorkSheet On Error GoTo Handler NewWorkSheet.name = name m_WorkSheet.Add NewWorkSheet, name Set NewWorkSheet.Parent = Me AddWorkSheet = True Exit Function Handler: Select Case Err.Number Case 457 AddWorkSheet = False Case Else 'Decide End Select End Function NickHK "RB Smissaert" wrote in message ... Looking for VB code to read an .xls file as BIFF8. Found code at Planet Source Code: http://devnull.at/?8QDSY But is has bugs and not managed yet to fix it. Would there be anybody on this forum who is willing to pass VB code (maybe the fixed code from PSC) that does this? Have posted to the VB6 group as well, but little reply from there. RBS |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
BIFF8 reader
Examining this reader code along with the code for those BIFF writers, may
give you some insight in where the errors lay. I'll have a look over the next few days, but don't hold your breath on any useful additions. NickHK "RB Smissaert" wrote in message ... I have no particular requirement, but I thought it would be useful to have this option available. The quoted VB code also kind of looks interesting. ADO will be fine, but it will be slower than reading as BIFF. RBS "NickHK" wrote in message ... Yes, this certainly looks promising, but would involve a LOT more study on my part to begin to correct some <any of the errors. I assume you have looked at ADO and decided it does not fit your requirements ? NickHK "RB Smissaert" wrote in message ... Thanks for that. I have fixed a few things, but like you I am working a bit in the dark as I don't know the BIFF format. I have the documentation, but I can't say it is simple. The main problem I am stuck with now is that it doesn't pick up the next cell if that cell holds an integer value and the previous cell on the same row held an integer as well. It would be nice to fix this as you can then quickly check a workbook without opening it. Haven't compared but I think it will be faster as well than using an Excel4Macro. RBS "NickHK" wrote in message ... I had a look at that and the first problem I found is the reading of the worksheets; it does not seems stop and reads then more than once resulting in a index error trying to add duplicate names to the WS collection. I don't know enough about the BIFF to say how to correct, but you could may be hack a fix by checking for that error in cWorkBook.AddWorkSheet. Or simply ignore the error until you know the BIFF reason <g. 'Previous routine Public Sub AddWorkSheet(name) Dim NewWorkSheet As New cWorkSheet NewWorkSheet.name = name m_WorkSheet.Add NewWorkSheet, name Set NewWorkSheet.Parent = Me End Sub 'change to Public Function AddWorkSheet(name) As Boolean Dim NewWorkSheet As New cWorkSheet On Error GoTo Handler NewWorkSheet.name = name m_WorkSheet.Add NewWorkSheet, name Set NewWorkSheet.Parent = Me AddWorkSheet = True Exit Function Handler: Select Case Err.Number Case 457 AddWorkSheet = False Case Else 'Decide End Select End Function NickHK "RB Smissaert" wrote in message ... Looking for VB code to read an .xls file as BIFF8. Found code at Planet Source Code: http://devnull.at/?8QDSY But is has bugs and not managed yet to fix it. Would there be anybody on this forum who is willing to pass VB code (maybe the fixed code from PSC) that does this? Have posted to the VB6 group as well, but little reply from there. RBS |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
BIFF8 reader
Yes, I have some very nice looking code to write to BIFF and looking at that
may help. Main trouble is not understanding the BIFF format. Thanks in any case for your efforts and I won't hold my breath. Will report back here when I have some progress with this. RBS "NickHK" wrote in message ... Examining this reader code along with the code for those BIFF writers, may give you some insight in where the errors lay. I'll have a look over the next few days, but don't hold your breath on any useful additions. NickHK "RB Smissaert" wrote in message ... I have no particular requirement, but I thought it would be useful to have this option available. The quoted VB code also kind of looks interesting. ADO will be fine, but it will be slower than reading as BIFF. RBS "NickHK" wrote in message ... Yes, this certainly looks promising, but would involve a LOT more study on my part to begin to correct some <any of the errors. I assume you have looked at ADO and decided it does not fit your requirements ? NickHK "RB Smissaert" wrote in message ... Thanks for that. I have fixed a few things, but like you I am working a bit in the dark as I don't know the BIFF format. I have the documentation, but I can't say it is simple. The main problem I am stuck with now is that it doesn't pick up the next cell if that cell holds an integer value and the previous cell on the same row held an integer as well. It would be nice to fix this as you can then quickly check a workbook without opening it. Haven't compared but I think it will be faster as well than using an Excel4Macro. RBS "NickHK" wrote in message ... I had a look at that and the first problem I found is the reading of the worksheets; it does not seems stop and reads then more than once resulting in a index error trying to add duplicate names to the WS collection. I don't know enough about the BIFF to say how to correct, but you could may be hack a fix by checking for that error in cWorkBook.AddWorkSheet. Or simply ignore the error until you know the BIFF reason <g. 'Previous routine Public Sub AddWorkSheet(name) Dim NewWorkSheet As New cWorkSheet NewWorkSheet.name = name m_WorkSheet.Add NewWorkSheet, name Set NewWorkSheet.Parent = Me End Sub 'change to Public Function AddWorkSheet(name) As Boolean Dim NewWorkSheet As New cWorkSheet On Error GoTo Handler NewWorkSheet.name = name m_WorkSheet.Add NewWorkSheet, name Set NewWorkSheet.Parent = Me AddWorkSheet = True Exit Function Handler: Select Case Err.Number Case 457 AddWorkSheet = False Case Else 'Decide End Select End Function NickHK "RB Smissaert" wrote in message ... Looking for VB code to read an .xls file as BIFF8. Found code at Planet Source Code: http://devnull.at/?8QDSY But is has bugs and not managed yet to fix it. Would there be anybody on this forum who is willing to pass VB code (maybe the fixed code from PSC) that does this? Have posted to the VB6 group as well, but little reply from there. RBS |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
BIFF8 reader
There is a BIFF reader and writer here with Delphi source code that
might be of help: http://delphi.icm.edu.pl/newl/midxd70f.htm RBS |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Reading Sheet Names/Index from closed file using Biff8. | Excel Programming | |||
Biff8 format documentation | Excel Programming | |||
The Biff8 and Ole2 formats | Excel Programming | |||
BIFF8 Sample | Excel Programming | |||
excel reader | Excel Programming |