kishan66
asked on
Excel using ASP
How can i create an Excel sheet at client side using ASP.
I tried to use CreateObject ("Excel.Application") & CreateObject("OWC.SpreadSh eet") but they just throw-ed error :"
ActiveX component can't create object: 'Excel.Application'
ActiveX component can't create object: 'OWC.Spreadsheet'
if i use Server.CreateObject it thorws
Server.CreateObject Failed..
can u pls tell me how create a simple excel sheet using ASP
I tried to use CreateObject ("Excel.Application") & CreateObject("OWC.SpreadSh
ActiveX component can't create object: 'Excel.Application'
ActiveX component can't create object: 'OWC.Spreadsheet'
if i use Server.CreateObject it thorws
Server.CreateObject Failed..
can u pls tell me how create a simple excel sheet using ASP
ASKER
Hi sammySeltzer,
That works great by adding couple of statements like Rs.MoveFirst & rs.MoveNext
But i would prefer creating a Excel object and add data to cells.
Reason:-
(i) If there are new columns that has to be added or modified i have to change the
table design, which i dont want to.
(ii) I want to use an exsisting Excel(as a template) which will only have the column headers ...and i shall dump the values from the database at what ever columns i need in that Excel template and save as newExcel.xls
Do you think is it possible from ASP?
Thanks
That works great by adding couple of statements like Rs.MoveFirst & rs.MoveNext
But i would prefer creating a Excel object and add data to cells.
Reason:-
(i) If there are new columns that has to be added or modified i have to change the
table design, which i dont want to.
(ii) I want to use an exsisting Excel(as a template) which will only have the column headers ...and i shall dump the values from the database at what ever columns i need in that Excel template and save as newExcel.xls
Do you think is it possible from ASP?
Thanks
Well, I have some code that you can use to add more columns to the db from asp.
Then all you would do is instead of selecting individual columns as I showed:
SELECT field1, field2,...fieldn FROM yourtable
You just select all the columns SELECT * from yourtable...
Then all you would do is instead of selecting individual columns as I showed:
SELECT field1, field2,...fieldn FROM yourtable
You just select all the columns SELECT * from yourtable...
ASKER
sammySeltzer,
May be i was not clear .
All i want is to add data from databaseto an existing Excel and save the excel file.
Thats all
May be i was not clear .
All i want is to add data from databaseto an existing Excel and save the excel file.
Thats all
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I have something much juicier but very complicated.
So, why not try starting with this?
Let me know if this is somethin you can use.
Open in new window