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

Programmatically creating Excel spreadsheets in ASP.NET

Hi,

I need to be able to programatically create excel spreadsheets in
ASP.NET (C#), WITHOUT having MS Office on the server.

Does anybody have any advice/links/whatever for me?

Thanks in advance,

Raoul.
Nov 18 '05 #1
14 2240
CT
Hmm, one way is to have a grid control that can export to an Excel sheet,
but otherwise you need a third-party control that does it for you. Here are
some links:
http://www.infragistics.com/products/grids.asp
http://www.devdirect.com/ALL/GRID_PCAT_1855.aspx
--
Carsten Thomsen
Enterprise Development with VS .NET, UML, and MSF
http://www.apress.com/book/bookDisplay.html?bID=105
"Raoul Snyman" <ra**********@psitek.com> wrote in message
news:e1**************************@posting.google.c om...
Hi,

I need to be able to programatically create excel spreadsheets in
ASP.NET (C#), WITHOUT having MS Office on the server.

Does anybody have any advice/links/whatever for me?

Thanks in advance,

Raoul.

Nov 18 '05 #2
Don
Hi Raoul,

Our Spread for Web Forms is a spreadsheet component that will import
and export Excel files, as well as many other features. Here's the
link for more info if you're interested in downloading a trial:
http://www.fpoint.com/netproducts/spreadweb/spread.html

- Donald
FarPoint
ra**********@psitek.com (Raoul Snyman) wrote in message news:<e1**************************@posting.google. com>...
Hi,

I need to be able to programatically create excel spreadsheets in
ASP.NET (C#), WITHOUT having MS Office on the server.

Nov 18 '05 #3
have you looked at the content type setting in the page declaration?

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Raoul Snyman" <ra**********@psitek.com> wrote in message
news:e1**************************@posting.google.c om...
Hi,

I need to be able to programatically create excel spreadsheets in
ASP.NET (C#), WITHOUT having MS Office on the server.

Does anybody have any advice/links/whatever for me?

Thanks in advance,

Raoul.

Nov 18 '05 #4
I belive the ContentType header will only help when you already have an
Excel file to send.

If you do not want to install MS Office then you have to look for third
party solution which will write an excel file from scratch.
It will be much cheaper to buy one than to write it yourself.

George.

"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
have you looked at the content type setting in the page declaration?

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Raoul Snyman" <ra**********@psitek.com> wrote in message
news:e1**************************@posting.google.c om...
Hi,

I need to be able to programatically create excel spreadsheets in
ASP.NET (C#), WITHOUT having MS Office on the server.

Does anybody have any advice/links/whatever for me?

Thanks in advance,

Raoul.


Nov 18 '05 #5
build a table in html, set the content type to excel (lookup the exact
phrase) and your page should generate as a spreadsheet, and the client will
execute their spreadsheet app or be prompted for download.

That's what I believe will work

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"George Ter-Saakov" <no****@hotmail.com> wrote in message
news:OT*************@TK2MSFTNGP10.phx.gbl...
I belive the ContentType header will only help when you already have an
Excel file to send.

If you do not want to install MS Office then you have to look for third
party solution which will write an excel file from scratch.
It will be much cheaper to buy one than to write it yourself.

George.

"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
have you looked at the content type setting in the page declaration?

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Raoul Snyman" <ra**********@psitek.com> wrote in message
news:e1**************************@posting.google.c om...
Hi,

I need to be able to programatically create excel spreadsheets in
ASP.NET (C#), WITHOUT having MS Office on the server.

Does anybody have any advice/links/whatever for me?

Thanks in advance,

Raoul.



Nov 18 '05 #6
Cool. I did not know that.
Is it working with Excel 2000? Or XP only?

George.
"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:ep**************@TK2MSFTNGP12.phx.gbl...
build a table in html, set the content type to excel (lookup the exact
phrase) and your page should generate as a spreadsheet, and the client will execute their spreadsheet app or be prompted for download.

That's what I believe will work

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"George Ter-Saakov" <no****@hotmail.com> wrote in message
news:OT*************@TK2MSFTNGP10.phx.gbl...
I belive the ContentType header will only help when you already have an
Excel file to send.

If you do not want to install MS Office then you have to look for third
party solution which will write an excel file from scratch.
It will be much cheaper to buy one than to write it yourself.

George.

"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
have you looked at the content type setting in the page declaration?

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Raoul Snyman" <ra**********@psitek.com> wrote in message
news:e1**************************@posting.google.c om...
> Hi,
>
> I need to be able to programatically create excel spreadsheets in
> ASP.NET (C#), WITHOUT having MS Office on the server.
>
> Does anybody have any advice/links/whatever for me?
>
> Thanks in advance,
>
> Raoul.



Nov 18 '05 #7
Raoul Snyman wrote:
Hi,

I need to be able to programatically create excel spreadsheets in
ASP.NET (C#), WITHOUT having MS Office on the server.

Does anybody have any advice/links/whatever for me?

Thanks in advance,

Raoul.


Hi Raoul

We ran into the same situation with our senior class project. We
cheated and used some vb script to solve the problem.

If you are going to have excel on the client machine and it is a local
intranet (for security settings) you can display the data as a datagrid.
And then use some vbscript to convert the datagrid to an excel spread
sheet. The only problem we ran across was having to set the security
settings on IE to prompt for initialize and script active X security
setting.

Otherwise one of my team member was suggesting the same thing as Curt.

Bob

Nov 18 '05 #8
Was possible since at least Excel 97 (much slower though to convert a big
file). With later version you could also probably use the XML schema used to
save Excel files though doing this yourself may still be overkill compared
with buying a component.

Patrice

"George Ter-Saakov" <no****@hotmail.com> a écrit dans le message de
news:ec**************@TK2MSFTNGP12.phx.gbl...
Cool. I did not know that.
Is it working with Excel 2000? Or XP only?

George.
"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:ep**************@TK2MSFTNGP12.phx.gbl...
build a table in html, set the content type to excel (lookup the exact
phrase) and your page should generate as a spreadsheet, and the client

will
execute their spreadsheet app or be prompted for download.

That's what I believe will work

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"George Ter-Saakov" <no****@hotmail.com> wrote in message
news:OT*************@TK2MSFTNGP10.phx.gbl...
I belive the ContentType header will only help when you already have an Excel file to send.

If you do not want to install MS Office then you have to look for third party solution which will write an excel file from scratch.
It will be much cheaper to buy one than to write it yourself.

George.

"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
> have you looked at the content type setting in the page declaration?
>
> --
> Curt Christianson
> Owner/Lead Developer, DF-Software
> Site: http://www.Darkfalz.com
> Blog: http://blog.Darkfalz.com
>
>
> "Raoul Snyman" <ra**********@psitek.com> wrote in message
> news:e1**************************@posting.google.c om...
> > Hi,
> >
> > I need to be able to programatically create excel spreadsheets in
> > ASP.NET (C#), WITHOUT having MS Office on the server.
> >
> > Does anybody have any advice/links/whatever for me?
> >
> > Thanks in advance,
> >
> > Raoul.
>
>



Nov 18 '05 #9
Oh, and .DOC types (by specifying word) will work as well, for those
interested, or rather it should :}

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"George Ter-Saakov" <no****@hotmail.com> wrote in message
news:ec**************@TK2MSFTNGP12.phx.gbl...
Cool. I did not know that.
Is it working with Excel 2000? Or XP only?

George.
"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:ep**************@TK2MSFTNGP12.phx.gbl...
build a table in html, set the content type to excel (lookup the exact
phrase) and your page should generate as a spreadsheet, and the client

will
execute their spreadsheet app or be prompted for download.

That's what I believe will work

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"George Ter-Saakov" <no****@hotmail.com> wrote in message
news:OT*************@TK2MSFTNGP10.phx.gbl...
I belive the ContentType header will only help when you already have an Excel file to send.

If you do not want to install MS Office then you have to look for third party solution which will write an excel file from scratch.
It will be much cheaper to buy one than to write it yourself.

George.

"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
> have you looked at the content type setting in the page declaration?
>
> --
> Curt Christianson
> Owner/Lead Developer, DF-Software
> Site: http://www.Darkfalz.com
> Blog: http://blog.Darkfalz.com
>
>
> "Raoul Snyman" <ra**********@psitek.com> wrote in message
> news:e1**************************@posting.google.c om...
> > Hi,
> >
> > I need to be able to programatically create excel spreadsheets in
> > ASP.NET (C#), WITHOUT having MS Office on the server.
> >
> > Does anybody have any advice/links/whatever for me?
> >
> > Thanks in advance,
> >
> > Raoul.
>
>



Nov 18 '05 #10
It's not really Excel Version Specific, it's just a generic "spreadsheet".
Whatever app they have set to open .XLS will be called.

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"George Ter-Saakov" <no****@hotmail.com> wrote in message
news:ec**************@TK2MSFTNGP12.phx.gbl...
Cool. I did not know that.
Is it working with Excel 2000? Or XP only?

George.
"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:ep**************@TK2MSFTNGP12.phx.gbl...
build a table in html, set the content type to excel (lookup the exact
phrase) and your page should generate as a spreadsheet, and the client

will
execute their spreadsheet app or be prompted for download.

That's what I believe will work

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"George Ter-Saakov" <no****@hotmail.com> wrote in message
news:OT*************@TK2MSFTNGP10.phx.gbl...
I belive the ContentType header will only help when you already have an Excel file to send.

If you do not want to install MS Office then you have to look for third party solution which will write an excel file from scratch.
It will be much cheaper to buy one than to write it yourself.

George.

"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
> have you looked at the content type setting in the page declaration?
>
> --
> Curt Christianson
> Owner/Lead Developer, DF-Software
> Site: http://www.Darkfalz.com
> Blog: http://blog.Darkfalz.com
>
>
> "Raoul Snyman" <ra**********@psitek.com> wrote in message
> news:e1**************************@posting.google.c om...
> > Hi,
> >
> > I need to be able to programatically create excel spreadsheets in
> > ASP.NET (C#), WITHOUT having MS Office on the server.
> >
> > Does anybody have any advice/links/whatever for me?
> >
> > Thanks in advance,
> >
> > Raoul.
>
>



Nov 18 '05 #11
you can create a simple comma separated list of data in the asp.net
application and save this to a file with the extension ".csv" then
send the file to the requesting client.

If they have excel installed on their machine, the .csv file will be
opened with Excel by default....
Nov 18 '05 #12
The only problem we had with this approach: You can not specify datatypes.
So some columns that supposed to be dates were converted to long numbers and
some part numbers (with dash) were converted to the dates.

George.
"rupert789" <ru*******@hotmail.com> wrote in message
news:78**************************@posting.google.c om...
you can create a simple comma separated list of data in the asp.net
application and save this to a file with the extension ".csv" then
send the file to the requesting client.

If they have excel installed on their machine, the .csv file will be
opened with Excel by default....

Nov 18 '05 #13
Could work also with the SYLK format if it still exists ? (back to Multiplan
?)

Patrice

"Curt_C [MVP]" <software_AT_darkfalz.com> a écrit dans le message de
news:e3**************@TK2MSFTNGP12.phx.gbl...
It's not really Excel Version Specific, it's just a generic "spreadsheet".
Whatever app they have set to open .XLS will be called.

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"George Ter-Saakov" <no****@hotmail.com> wrote in message
news:ec**************@TK2MSFTNGP12.phx.gbl...
Cool. I did not know that.
Is it working with Excel 2000? Or XP only?

George.
"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:ep**************@TK2MSFTNGP12.phx.gbl...
build a table in html, set the content type to excel (lookup the exact
phrase) and your page should generate as a spreadsheet, and the client

will
execute their spreadsheet app or be prompted for download.

That's what I believe will work

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"George Ter-Saakov" <no****@hotmail.com> wrote in message
news:OT*************@TK2MSFTNGP10.phx.gbl...
> I belive the ContentType header will only help when you already have an > Excel file to send.
>
> If you do not want to install MS Office then you have to look for third > party solution which will write an excel file from scratch.
> It will be much cheaper to buy one than to write it yourself.
>
> George.
>
> "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
> news:%2****************@tk2msftngp13.phx.gbl...
> > have you looked at the content type setting in the page declaration? > >
> > --
> > Curt Christianson
> > Owner/Lead Developer, DF-Software
> > Site: http://www.Darkfalz.com
> > Blog: http://blog.Darkfalz.com
> >
> >
> > "Raoul Snyman" <ra**********@psitek.com> wrote in message
> > news:e1**************************@posting.google.c om...
> > > Hi,
> > >
> > > I need to be able to programatically create excel spreadsheets in > > > ASP.NET (C#), WITHOUT having MS Office on the server.
> > >
> > > Does anybody have any advice/links/whatever for me?
> > >
> > > Thanks in advance,
> > >
> > > Raoul.
> >
> >
>
>



Nov 18 '05 #14
dunno. You'd have to get a list of supported content types. I'm sure it's
out there, just dont have it handy in front of me right now.

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Patrice" <no****@nowhere.com> wrote in message
news:ud**************@TK2MSFTNGP09.phx.gbl...
Could work also with the SYLK format if it still exists ? (back to Multiplan ?)

Patrice

"Curt_C [MVP]" <software_AT_darkfalz.com> a écrit dans le message de
news:e3**************@TK2MSFTNGP12.phx.gbl...
It's not really Excel Version Specific, it's just a generic "spreadsheet".
Whatever app they have set to open .XLS will be called.

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"George Ter-Saakov" <no****@hotmail.com> wrote in message
news:ec**************@TK2MSFTNGP12.phx.gbl...
Cool. I did not know that.
Is it working with Excel 2000? Or XP only?

George.
"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:ep**************@TK2MSFTNGP12.phx.gbl...
> build a table in html, set the content type to excel (lookup the exact > phrase) and your page should generate as a spreadsheet, and the client will
> execute their spreadsheet app or be prompted for download.
>
> That's what I believe will work
>
> --
> Curt Christianson
> Owner/Lead Developer, DF-Software
> Site: http://www.Darkfalz.com
> Blog: http://blog.Darkfalz.com
>
>
> "George Ter-Saakov" <no****@hotmail.com> wrote in message
> news:OT*************@TK2MSFTNGP10.phx.gbl...
> > I belive the ContentType header will only help when you already
have an
> > Excel file to send.
> >
> > If you do not want to install MS Office then you have to look for

third
> > party solution which will write an excel file from scratch.
> > It will be much cheaper to buy one than to write it yourself.
> >
> > George.
> >
> > "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
> > news:%2****************@tk2msftngp13.phx.gbl...
> > > have you looked at the content type setting in the page

declaration? > > >
> > > --
> > > Curt Christianson
> > > Owner/Lead Developer, DF-Software
> > > Site: http://www.Darkfalz.com
> > > Blog: http://blog.Darkfalz.com
> > >
> > >
> > > "Raoul Snyman" <ra**********@psitek.com> wrote in message
> > > news:e1**************************@posting.google.c om...
> > > > Hi,
> > > >
> > > > I need to be able to programatically create excel spreadsheets in > > > > ASP.NET (C#), WITHOUT having MS Office on the server.
> > > >
> > > > Does anybody have any advice/links/whatever for me?
> > > >
> > > > Thanks in advance,
> > > >
> > > > Raoul.
> > >
> > >
> >
> >
>
>



Nov 18 '05 #15

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

Similar topics

5
by: Guy Incognito | last post by:
Hello, I've written an asp.net application that creates Excel documents. It works by creating an excel document in XML format. But I wonder if I'm reinventing the wheel. I know that there are...
1
by: smonczka | last post by:
I have a DTS package that needs to refresh data in 3 separate Excel spreadsheets on a daily basis. The problem is that unless I manually delete the previous day's data, it appends rather than...
3
by: Elliot | last post by:
The program loops through a dataset and creates several spreadsheets based on a change in a particular column. With each new spreadsheet I launch a new instance of excel. After about 100...
0
by: Rich Wallace | last post by:
Hello all, Looking for suggestions and tips if possible. I have an application running on a file server that utilizes the FileSystemWatcher to trap when any Excel files are saved by a user. I...
2
by: Jim S | last post by:
To my surprise and chagrin, newer versions of Access have disabled the functionality that lets users change the data in linked tables that point to a range in an Excel workbook. This is "because of...
19
by: wreckingcru | last post by:
I'm trying to output a SQL query that is constructed thru my VB.net GUI into an excel file. Here is the code I'm using: 'Sqlstmt is the SQL query statement 'Conn is the SQL Connection object...
1
by: Mitch | last post by:
I am using Access to create an Excel spreadsheets with graphs related to rows on the sheet1 to the graph on sheet2. I am using the same data but different subsets of the data to make different...
11
by: Andy Burchill | last post by:
Hi there, I am trying to find out what the best way of creating an excel spreadsheet is, this will need to be done dynamically by an aspx website on the server side. The main way would be to...
1
by: thadson | last post by:
Hi, I'm trying to import specific cells from MS Excel 2000 spreadsheets to MS Access 2000 tables then move the spreadsheets to a different directory. I'm very new to this and I'm having trouble...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
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: 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:
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...

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.