473,791 Members | 2,725 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2851
"Andy Burchill" <an**********@c lara.co..ukwrot e in message
news:11******** ********@iris.u k.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...@c lara.co..ukwrot e:
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******** ********@TK2MSF TNGP02.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**********@c lara.co..ukwrot e in message
news:11******** ********@iris.u k.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**********@c lara.co..ukwrot e in message
news:11******** ********@iris.u k.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*******@yaho o.yabbadabbadoo .comwrote in
message news:7E******** *************** ***********@mic rosoft.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*******@yaho o.yabbadabbadoo .comwrote in
message news:7E******** *************** ***********@mic rosoft.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

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

Similar topics

5
3204
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 to code a solution to this it'll probably be done in ASP on a web server, unless there's a significantly better way. I'm looking for a way to create over 100 Excel *charts* programmatically.
1
47750
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 HTML table and send it to an ASP page. The ASP page has: Response.AddHeader ("Content-Disposition", "inline"); Response.ContentType = "application/vnd.ms-excel"); Response.Write(formatted_html_data);
5
3388
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 ways to read and write Excel files with ADO, but as far as I can tell, it doesn't provide the flexibility I need. I need to be able to generate tabs, cell formatting, formulas, etc.
14
2289
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 advance, Raoul.
9
4438
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 asp.net. The Xl sheet should not be opened in the browser. All the information from dataset(datatable,datarows) should be sent to XL and the file name should be given dynamically through program and the xl file should be saved dynamically through...
0
2253
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 then need to 'trap' the current file and generate an XML file from the data within the active spreadsheet. I have two issues so far with doing this... Issue 1: Once a file that is being watched is saved, I grab it using the
19
12772
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 cmd = New SqlCommand(Sqlstmt, Conn) datareader = cmd.ExecuteReader()
1
4620
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 spreadsheets for different groups. The spreadsheet formats are the same for each of the different groups. So I am using a loop to requery the data for the different groups and create a new spreadsheet for each group. The three graphs on sheet 2...
0
2178
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 generate a chart based on the input dataset. (By the way, the component must be free) So far, I have tried a lot of components which are really good but they do not provide all the required functionality altogether and some of them have trade offs when...
0
10426
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10207
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10154
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9993
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9029
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7537
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6776
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5558
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2913
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.