By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,496 Members | 1,528 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,496 IT Pros & Developers. It's quick & easy.

BinaryWriting Excel Blobs

P: n/a
Hi group, I have a nice little CMS application which has been running
for quite some time storing content in blobs in sql (the 'image'
datatype) and spitting them out to a frame in the browser via a page
called showContent.aspx:

Response.ContentType = strContentType

However, Excel seems to display some rather odd behaviour:

1/ When someone already has an Excel page open in the frame, they get:
"A document with the name showContent.aspx is already open..."
Does this mean that if the content type is excel, I need to redirect to
showContent2.aspx, showContent3.aspx, etc. *randomly*, so that it's
always a different name?? I'm prepared to do this, if it will solve the
problem, but it just seems like a real hack. I'm also toying with the
idea of storing excel docs physically, rather than as blobs in the db,
but that again would be a real pain.

2/ After the second or third excel sheet, excel seems to let them
through anyway and we get a string of "File error: data may have been
lost" errors (presumably to do with how the 'file' is being opened). If
you then click on any of the tabs of the excel sheet once it has limped
through this, the tab on the excel sheet disappears...!

Just wondering if I am doing anything obviously wrong re binarywriting
excel, and if so what I should be doing, although all other formats
seem to work fine (incl. pdf, flash, images, word, everything really!)

Any feedback is much appreciated, and if you would like any further
info (versions, etc.) then let me know but it's all up to date and
patched (and happening on multiple client machines).

Many thanks,

Nov 19 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
FYI, I decided to implement an ugly hack:

If CInt(Session("ExcelHack")) = 1 Then
Session("ExcelHack") = 2
Session("ExcelHack") = 1
End If

If anyone knows of a tidier way of fixing this, then do let me know.

Many thanks,

Nov 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.