473,385 Members | 1,846 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Binary Stream Excel Client Problem

Don
Response.ContentType() = "application/vnd.ms-excel"
Response.Charset = ""
Response.BinaryWrite(stream)

The code when executed causes the
client to open an excel document and
display the information.
Included in the stream is a clock hh:mm:ss that appears in the
content.
The issue is when I run the app a second time
the page comes up in excel but it is the same stuff from the earlier
page. Time does not change.

If I change the content type to text html the
client will display a new page with updated
time after each request.

Is the Excel Page cached somewhere on the client
How do I get around this?

Any help is appreciated.
Note 3 machies 2 XP Pro Excel 2002 sp3 Fail to display new sheet
upon request
1 Win 2k Excel 2000 sp3 Works ok will display
new time in a sheet

Jan 25 '06 #1
3 1812
Do you send an Excel File? Or just a csv file in the stream? Not really
sure where to clock is set.

You could change the filename everytime, so it shouldn't cache it:

Response.ContentType = "application/vnd.ms-excel";
Response.AddHeader("Content-Disposition", "attachment;Filename=" +
fileName);

Hope that helps anyway.
Remy Blaettler

Jan 25 '06 #2
Hello Don,
Response.ContentType() = "application/vnd.ms-excel"
Response.Charset = ""
Response.BinaryWrite(stream)
The code when executed causes the
client to open an excel document and
display the information.
Included in the stream is a clock hh:mm:ss that appears in the
content.
The issue is when I run the app a second time
the page comes up in excel but it is the same stuff from the earlier
page. Time does not change.
If I change the content type to text html the
client will display a new page with updated
time after each request.
Is the Excel Page cached somewhere on the client
Probably yes.
How do I get around this?


Before streaming out the document, add

Response.Cache.SetCacheability(HttpCacheability.No Cache);

Cheers,
--
Joerg Jooss
ne********@joergjooss.de
Jan 25 '06 #3
Don
Well thank you both for you replies....

We are using SAS Addin for MS Office.
I have since found it interferes with the proper operation of
the stream in conjunction with IE and Excel.

When the first stream is received, it stores the received stream as a
file in the cache
Content.mso folder.

When the second request is made, the client just dishes out the same
file already in cache!

I have noticed the Excel task stays runnng
even if you close out IE. This is abnormal. Excel should close out if
you stream to the client and then exit out of IE.

I removed SAS AMO and the machine works as it should. Presents a new
page each time a new stream is requested. The Excel task closes like it
should after exiting IE,

Joerg I am using the Nocache option but that does not help.
I wonder if there is something different needed to control MSO cache?

Remy thanks for the info on new naming. I may use that!
Don.....

Jan 26 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Russ Reynolds | last post by:
Problem: I'm writing a client app. that needs to download an image file (non-text) from a remote location and save to the client machine. Here is what I have so far (pseudocode): import...
2
by: SubbaRao Karanam | last post by:
What does this error for the Code below java.io.StreamCorruptedException: invalid stream header at java.io.ObjectInputStream.readStreamHeader(Unknown Source) at...
2
by: redneon | last post by:
I'm writing a small FTP client to include in one of my programs but I'm not sure how to get a binary stream using the TCPStream. This is my code at the moment... responseConnection = new...
11
by: ajou_king | last post by:
I was running some tests on my Win32 1GHZ processor to see how long it would take to transmit objects numerous times via TCP/IP using C# ..NET Remoting vs the C++ trustworthy method of binary...
1
by: Gilad Kapelushnik | last post by:
Hello I need to send data (a whole class) from a Sever to a Client. I convert this class to a binary array using Binary Serialization: public byte ToBytes(){ try{ IFormatter formatter = new...
2
by: gauravkhanna | last post by:
Hi All I need some help for the below problem: Scenario We need to send large binary files (audio file of about 10 MB or so) from the client machine (.Net Windows based application, located...
1
by: Pedro Leite | last post by:
hello. got stalled at at point that i can no longer get my thoughts together. the point, is in classic asp, stream an excel file from a firebird database. temporarly save it if necessary...
4
by: Pedro Leite | last post by:
Good Afternoon. the code below is properly retreiving binary data from a database and saving it. but instead of saving at client machine is saving at the server machine. what is wrong with my...
0
by: Tommaso Caldarola | last post by:
I got the following exception System.Runtime.Serialization.SerializationException: The input stream is not a valid binary format. The starting contents (in bytes) are:...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.