473,385 Members | 1,890 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.

creating excel spreadsheets server side dynamically

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 use the Excel com object that is available when
you have excel installed, however since this is done server side I need
to be sure that it won't generate any dialog box error messages. There
are also concerns about threading.

Most of the examples I can find on the web seem to be quite old, has
anyone recently done this who could share their thoughts ?.

Any help appreciated.

Regards.
Jun 5 '07 #1
11 2817
"Andy Burchill" <an**********@clara.co..ukwrote in message
news:11****************@iris.uk.clara.net...
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 use the Excel com object that is available when
you have excel installed
You can't do server-side automation of Office - Microsoft don't support it
because it doesn't work:
http://support.microsoft.com/default...US;q257757#kb2
There are also concerns about threading.
Threading will be the least of your worries, believe me! Don't even
contemplate this...
Most of the examples I can find on the web seem to be quite old, has
anyone recently done this who could share their thoughts ?.
There are three ways to achieve what you need:

1) Use HTML
Create an HTML document and then give it a .xls extension. This is extremely
easy, and is free - however, you won't be able to have multiple worksheets.

2) Use XML
http://www.microsoft.com/downloads/d...displaylang=en
http://www.microsoft.com/downloads/d...displaylang=en

This is extremely powerful, and is free, but is most definitely not for the
faint-hearted...

3) Use Aspose
http://www.aspose.com/Products/Aspos...s/Default.aspx

This is extremely powerful and extremely easy to use, but it's not free.
--
http://www.markrae.net

Jun 5 '07 #2
On 5 Jun, 10:34, Andy Burchill <andyburch...@clara.co..ukwrote:
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 use the Excel com object that is available when
you have excel installed, however since this is done server side I need
to be sure that it won't generate any dialog box error messages. There
are also concerns about threading.

Most of the examples I can find on the web seem to be quite old, has
anyone recently done this who could share their thoughts ?.

Any help appreciated.

Regards.
Export the data in csv format. Later on csv file can be open using
Excel or notepad and still its free.

Jun 5 '07 #3
eps
-pb- wrote:
Export the data in csv format. Later on csv file can be open using
Excel or notepad and still its free.
That is certainly one option, however I was interested in doing some
formatting in the excel file. Its supposed to be a kind of order form
so making it look good would be beneficial. There are many different
types of product though so it needs to be able to be generated dynamically.

Regards.

Jun 5 '07 #4
"eps" <ep*@mailinator.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
That is certainly one option, however I was interested in doing some
formatting in the excel file. Its supposed to be a kind of order form so
making it look good would be beneficial. There are many different types
of product though so it needs to be able to be generated dynamically.
Did you see my reply to Andy Burchill...?
--
http://www.markrae.net

Jun 5 '07 #5

"Andy Burchill" <an**********@clara.co..ukwrote in message
news:11****************@iris.uk.clara.net...
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 use the Excel com object that is available when
you have excel installed, however since this is done server side I need to
be sure that it won't generate any dialog box error messages. There are
also concerns about threading.

Most of the examples I can find on the web seem to be quite old, has
anyone recently done this who could share their thoughts ?.

Any help appreciated.
What about using OWC? It is recent. It's ASP.NET using VB.NET with the
example, but I don't see why you can't do it in C#. I have taken VB.NET
examples and done them in C#.

http://www.4guysfromrolla.com/webtech/022801-1.shtml

Jun 5 '07 #6
PS

"Andy Burchill" <an**********@clara.co..ukwrote in message
news:11****************@iris.uk.clara.net...
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 use the Excel com object that is available when
you have excel installed, however since this is done server side I need to
be sure that it won't generate any dialog box error messages. There are
also concerns about threading.

Most of the examples I can find on the web seem to be quite old, has
anyone recently done this who could share their thoughts ?.
Also check out www.tmssoftware.com for a product called FlexCel.

PS
Jun 5 '07 #7
As you hopefully have gathered by now, you do NOT want to try to use Excel on
the Server as there are all kinds of problems, and it was never designed for
this.

You could take a look at this:
http://www.carlosag.net/Tools/ExcelX...r/Default.aspx

Peter
--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"Andy Burchill" wrote:
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 use the Excel com object that is available when
you have excel installed, however since this is done server side I need
to be sure that it won't generate any dialog box error messages. There
are also concerns about threading.

Most of the examples I can find on the web seem to be quite old, has
anyone recently done this who could share their thoughts ?.

Any help appreciated.

Regards.
Jun 5 '07 #8
"Peter Bromberg [C# MVP]" <pb*******@yahoo.yabbadabbadoo.comwrote in
message news:7E**********************************@microsof t.com...
You could take a look at this:
http://www.carlosag.net/Tools/ExcelX...r/Default.aspx
Wow! That looks superb - have you tried it yourself...?
--
http://www.markrae.net

Jun 5 '07 #9
Mark Rae wrote:
"Peter Bromberg [C# MVP]" <pb*******@yahoo.yabbadabbadoo.comwrote in
message news:7E**********************************@microsof t.com...
>You could take a look at this:
http://www.carlosag.net/Tools/ExcelX...r/Default.aspx

Wow! That looks superb - have you tried it yourself...?
I had already come across this whilst searching on the web, I think this
is almost exactly what I want as I have already prototyped my app and it
works well.

The major drawback that I can see is that you need Excel 2003 or later
to read an XML spreadsheet that it produces. (An the free Excel Viewer
app does not seem to want to display them at all).

Regards.
Jun 5 '07 #10
Mark Rae wrote:
"eps" <ep*@mailinator.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
>That is certainly one option, however I was interested in doing some
formatting in the excel file. Its supposed to be a kind of order form
so making it look good would be beneficial. There are many different
types of product though so it needs to be able to be generated
dynamically.

Did you see my reply to Andy Burchill...?
Yes I did, thanks for replying. I take your point about Microsoft not
supporting creating them server side.

Regards.
Jun 5 '07 #11
"Andy Burchill" <an**********@clara.co..ukwrote in message
news:11****************@iris.uk.clara.net...
I had already come across this whilst searching on the web, I think this
is almost exactly what I want as I have already prototyped my app and it
works well.

The major drawback that I can see is that you need Excel 2003 or later to
read an XML spreadsheet that it produces. (An the free Excel Viewer app
does not seem to want to display them at all).
Hmm...

Obviously, Aspose creates "native" Excel files, but it isn't free...
--
http://www.markrae.net

Jun 5 '07 #12

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

Similar topics

5
by: Alan | last post by:
Hi there, Are there Excel charting gurus here?? If so then please read on... Sorry for the cross-post but I'm not familiar with the Excel groups. I've posted to asp.general because if I have...
1
by: Jim, N2VX | last post by:
I'd like to create/display an Excel spreadsheet from javascript. We have an HTML page with results of a search and it can be reasonably large. The first attempt was to format the data into an...
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...
14
by: Raoul Snyman | last post by:
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...
9
by: hari krishna | last post by:
hi, I want to send the data from dataset information to Excel through ASP.Net. there will be no XL installed on web server. web server is win 2000 server machine. I am using visual basic code in...
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...
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...
0
by: eolmos | last post by:
Hello everyone, I am currently working on a project that requires a webform in asp.net using C# as the code behind. The page must allow the user to create a report in excel. This report must also...
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: 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
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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.