.NETGURU
how to open excel onthe fly
Messages   Related Types
This message was discovered on ASPFriends.com 'ngfx-msoffice' list.


siri siris
hi

i am doing web programming...when the user comes to
one page, i have to retrieve data from database and i
need to open one excel sheet on the client machine by
filling the data retrieved from database....i know how
to read data from database and fill the excel
sheet...but i don't know how to open excel sheet on
the fly on client machine(i.e when customer accessed
one web page i need to open excel sheet on his
machine)...if any one have any samples can you please
send me some thing about this...i will appriciate any
help on this...

thanks
siri

__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Mother's Day is May 12th!
http://shopping.yahoo.com

Reply to this message...
 
    
Jose Fuentes
just have it where IIS can see it and make a url or just point them to it.
htt:\www.whatever.com\exceltest.xls
this will only work in IE 5.0 and up it will open within the IE browser.
Joe

-----Original Message-----
From: siri siris [mailto:Click here to reveal e-mail address]
Sent: Wednesday, May 08, 2002 9:34 PM
To: ngfx-msoffice
Subject: [ngfx-msoffice] how to open excel onthe fly

hi

i am doing web programming...when the user comes to
one page, i have to retrieve data from database and i
need to open one excel sheet on the client machine by
filling the data retrieved from database....i know how
to read data from database and fill the excel
sheet...but i don't know how to open excel sheet on
the fly on client machine(i.e when customer accessed
one web page i need to open excel sheet on his
machine)...if any one have any samples can you please
send me some thing about this...i will appriciate any
help on this...

thanks
siri

__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Mother's Day is May 12th!
http://shopping.yahoo.com

| [ngfx-msoffice] member Click here to reveal e-mail address = YOUR ID
| http://www.aspfriends.com/aspfriends/ngfx-msoffice.asp = JOIN/QUIT

Reply to this message...
 
    
siri siris
hi joe

actually i am doing like below....

Protected appXL As New Excel.Application()
Protected wbk As Excel.Workbook =
appXL.Workbooks.Add(Excel.XlSheetType.xlWorksheet)
Protected myWorksheet As Excel.Worksheet =
CType(wbk.ActiveSheet, Excel.Worksheet)

after that i am writing headers and data to
myWorkSheet. after that i am saving worksheet like
below...

myWorksheet.SaveAs(Server.MapPath("xlsfiles\te.xls"),
System.Reflection.Missing.Value,
System.Reflection.Missing.Value,
System.Reflection.Missing.Value,
Excel.XlSaveAsAccessMode.xlNoChange,
System.Reflection.Missing.Value,
System.Reflection.Missing.Value,
System.Reflection.Missing.Value,
System.Reflection.Missing.Value)

wbk.Close()
appXL.Quit()

when i tryed to open like below it is saying that file
is read only...

Response.Redirect(Server.MapPath("xlsfiles\te.xls"))

but actually i want to make it as write also...please
help me how to make it....

thanks
siri
--- Jose Fuentes <Click here to reveal e-mail address> wrote:
[Original message clipped]

__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Mother's Day is May 12th!
http://shopping.yahoo.com

Reply to this message...
 
    
Jose Fuentes
well one fact is that once shown in the browser it's just a clone of the one
on the server. you can make changes but you can only save to the clients
local harddrive not back to the server.
the msgbox poping up readonly is probably because the object hasn't
completly closed yet so IIS doesn't have exclusive rights to it but only
read only.
Setting a timer or closing the objects before calling the link might help
with that problem.
but as far as resaving it back to the server well your have to work out a
upload routine where by the user can save it to there desktop and play with
it and later reupload it back to the server via a upload page.

The only way to save directly back to IIS is to allow users in IIS to have
write rights but that will just give a hacker a field day because not only
can they write but then they can over write and mess everything up.

Hope that clears it up a bit.
Joe

-----Original Message-----
From: siri siris [mailto:Click here to reveal e-mail address]
Sent: Thursday, May 09, 2002 3:14 PM
To: ngfx-msoffice
Subject: [ngfx-msoffice] RE: how to open excel onthe fly

hi joe

actually i am doing like below....

Protected appXL As New Excel.Application()
Protected wbk As Excel.Workbook =
appXL.Workbooks.Add(Excel.XlSheetType.xlWorksheet)
Protected myWorksheet As Excel.Worksheet =
CType(wbk.ActiveSheet, Excel.Worksheet)

after that i am writing headers and data to
myWorkSheet. after that i am saving worksheet like
below...

myWorksheet.SaveAs(Server.MapPath("xlsfiles\te.xls"),
System.Reflection.Missing.Value,
System.Reflection.Missing.Value,
System.Reflection.Missing.Value,
Excel.XlSaveAsAccessMode.xlNoChange,
System.Reflection.Missing.Value,
System.Reflection.Missing.Value,
System.Reflection.Missing.Value,
System.Reflection.Missing.Value)

wbk.Close()
appXL.Quit()

when i tryed to open like below it is saying that file
is read only...

Response.Redirect(Server.MapPath("xlsfiles\te.xls"))

but actually i want to make it as write also...please
help me how to make it....

thanks
siri
--- Jose Fuentes <Click here to reveal e-mail address> wrote:
[Original message clipped]

__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Mother's Day is May 12th!
http://shopping.yahoo.com

| [ngfx-msoffice] member Click here to reveal e-mail address = YOUR ID
| http://www.aspfriends.com/aspfriends/ngfx-msoffice.asp = JOIN/QUIT

Reply to this message...
 
    
akegato
(Type your message here)
I have a problem to ask someone.
Now, I copy the code into my program but it has a problem ,"Dim ObjExcel As New Excel.Application", the Excel.Application is not defined.
And so I would to know how to solve this problem.

thanks
akegato
--------------------------------
From: akegato
Reply to this message...
 
    
siri siris
hi joe

i am declaring excel,workbook and two worksheets like
below...

Protected appXL As New Excel.Application()

Protected wbk As Excel.Workbook =
appXL.Workbooks.Add(Excel.XlSheetType.xlWorksheet)

Protected myWorksheetResi As Excel.Worksheet =
CType(wbk.ActiveSheet, Excel.Worksheet)
Protected myWorksheetTCRe As Excel.Worksheet =
CType(wbk.ActiveSheet, Excel.Worksheet)

i am adding data to worksheets.how to add work sheets
to work book...

i am saving workbook like below...

wbk.SaveAs(Server.MapPath("xlsfiles\" &
Request("wonumber") & ".xls"),
System.Reflection.Missing.Value, ,
System.Reflection.Missing.Value, False,
System.Reflection.Missing.Value,
Excel.XlSaveAsAccessMode.xlNoChange,
System.Reflection.Missing.Value,
System.Reflection.Missing.Value,
System.Reflection.Missing.Value,
System.Reflection.Missing.Value)

thanks
siri
--- Jose Fuentes <Click here to reveal e-mail address> wrote:
[Original message clipped]

__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Mother's Day is May 12th!
http://shopping.yahoo.com

Reply to this message...
 
    
Ramesh Singh
(Type your message here)
Hello
--------------------------------
From: Ramesh Singh
Reply to this message...
 
 
System.Reflection.Missing




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification