Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Reading Sheet Names/Index from closed file using Biff8. keepITcool Excel Programming 16 November 5th 04 01:48 PM
Biff8 format documentation Basil[_4_] Excel Programming 3 July 7th 04 02:36 PM
The Biff8 and Ole2 formats Basil[_4_] Excel Programming 1 July 7th 04 05:19 AM
BIFF8 Sample ABC - Sébastien Beaugrand Excel Programming 8 April 27th 04 06:52 AM
excel reader lilcajun Excel Programming 2 February 3rd 04 04:45 PM


All times are GMT +1. The time now is 01:20 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"