473,386 Members | 1,706 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,386 software developers and data experts.

stream excel sheet from binary database to the browser

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
stream it to the browser
delete the temp file

on googling, i found some examples but all assuming that the file is locally
present.
on the other hand, i beleive that is possible to stream the binary file and
the save it locally to then present it to the browser, but i can't figure
out how.

anyone would help me on this ?? firefox friendly if possible.

thank you in advance

Pedro Leite From Portugal.
Jun 13 '06 #1
1 2894
i got this far

with this code, i can gat the excel file from the database and present it on
ie or pop the download box in ff
-------------------------------------
Response.Buffer = True
' Connection String
Dim connStr
connStr = "Provider=MSDASQL.1;Extended
Properties=Driver={Firebird/Interbase(r)
driver};Dbname=xxxxx-xxx:/xxx/xxx.gdb;CHARSET=ISO8859_1;PWD=xxxxxx;UID=xxxxx"
' Recordset Object
Dim rs
Set rs = Server.CreateObject("ADODB.Recordset")
'Response.ContentType = "image/jpeg"
' opening connection
rs.Open "SELECT NOME_FICHEIRO,NOME_LOGICO, FICHEIRO FROM TCS_XIBFS
Where NOME_LOGICO = '" & request.querystring("doc") & "'", connStr, 2, 4

Response.Clear()
Response.ContentType = "application/x-msexcel"
Response.BinaryWrite rs("FICHEIRO")
Response.end
----------------------------------------
Now, i would like to save the binary file in the client computer.
been searching and found the binarystream object and tried this but no good
'BinaryStream.Type = adTypeBinary
'Open the stream And write binary data To the object
'BinaryStream.Open
'BinaryStream.Write rs("FICHEIRO") <-- this comes from the data base.
'Save binary data To disk
'BinaryStream.SaveToFile "c:\x.xls", adSaveCreateOverWrite

anyone would please point me on the right direction ??

thank you in advance

Pedro Leite
----------------------------------




"Pedro Leite" <naoehpreciso> escreveu na mensagem
news:%2****************@TK2MSFTNGP02.phx.gbl...
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
stream it to the browser
delete the temp file

on googling, i found some examples but all assuming that the file is
locally present.
on the other hand, i beleive that is possible to stream the binary file
and the save it locally to then present it to the browser, but i can't
figure out how.

anyone would help me on this ?? firefox friendly if possible.

thank you in advance

Pedro Leite From Portugal.

Jun 14 '06 #2

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

Similar topics

2
by: Jawahar Rajan | last post by:
All, I am trying to export a result set as an excel spread sheet. Most of the time this works as expected, when a user chooses to save as excel the browser pop-up a save as dialog to allow the...
5
by: Rajiv | last post by:
HI ALL, actually , i m working in a company having large number of employee , i have two userid and password . on id is from admin group(id given to me by technology manager) of the server and...
3
by: Mads Petersen | last post by:
I'm stuck in this code. Hope you can and will help me. I launch it from excel. I have made the following code work, but not as i whant. I need the ranges to be working with something like xlDown....
14
by: pmud | last post by:
Hi, I need to use an Excel Sheet in ASP.NET application so that the users can enter (copy, paste ) large number of rows in this Excel Sheet. Also, Whatever the USER ENETRS needs to go to the...
6
by: Daniel | last post by:
Hi all, Can i open and edit the excel sheet on web page after downloading? After editing, i close the web page and the excel file auto upload to the server. Is it possible? I really struggling...
3
by: Don | last post by:
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...
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...
1
by: axiarich | last post by:
We have some doc mgt "lite" on our site. I basically have a window with a button that opens the relevant document (Excel, PDF, etc.). The button calls some javascript which basically performs a...
4
by: JaxDawg | last post by:
I have a spreadsheet saved as an XML spreadsheet so I can manipulate it easier (and don't need COM). When I'm done, I want to display to the user. Currently, I'm using simple JavaScript in my PHP...
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: 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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.