creating excel spreadsheets server side dynamically

  • Thread starter Thread starter Andy Burchill
  • Start date Start date
A

Andy Burchill

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.
 
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.aspx?scid=kb;EN-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/...52-3547-420a-a412-00a2662442d9&displaylang=en
http://www.microsoft.com/downloads/...80-f2c0-4b80-9ad1-2cb0c300aef9&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/Aspose.Cells/Default.aspx

This is extremely powerful and extremely easy to use, but it's not free.
 
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.
 
-pb- said:
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.
 
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...?
 
Andy Burchill said:
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
 
Andy Burchill said:
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
 
Mark said:
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.
 
Mark said:
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.
 
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...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top