View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Raja Raja is offline
external usenet poster
 
Posts: 70
Default Copying Excel File Problem

yes I'm storing the excel file(.xlsm) as a BLOB in a database, and here is my
code

Dim lStream As System.IO.FileStream = System.IO.File.OpenRead("myFile")
ReDim lByte(CInt(lStream.Length))
Call lStream.Read(lByte, 0, CInt(lStream.Length))
lFile = System.IO.File.Create("newFile")
Call lFile.Write(lByte, 0, lByte.Length)
Call lFile.Close()


"NickHK" wrote:

Raja,
You mean that you are storing the Excel file as a BLOB in a database ?

If so, it would seems that you are creating corruption somewhere during the
read/write process.

NickHK

"Raja" wrote in message
...
Hello,

I'm trying to the following scenario in Excel2007:

1) Reading binary data for an Excel workbook file and saving these binary
data in Database
2) Reading the binary data from the database and saving it to a file by
using File.Write mehtod of .Net
3) When openning the file in Excel2007, i get the following message

"Excel
completed file level validation and repair. Some parts of this workbook

may
have been repaired or discarded"

Why I'm getting this message even in the simple workbook which contain

only
one value in one cell?