Generate Excel files on server

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,
I want to create a C# application running on a Windows 2003 server. This application retrieves data from a database, performs some modifications then creates an Excel file on a shared folder on the server. Then at any time, users on the network can get the file to see the formatted data.

There is no web involved. It is a service running on the server that creates periodically the Excel file.

Is there a way to do that without having Excel installed on the server?

Thanks,
David.
 
How complex is the content? Are there multiple sheets, formulae etc ?
If you can get a handle on the format then you can write out the
content as xml and XL 2K(?)+ should be able to open it.

If it's just a straight tabular format on one sheet then you could try
writing it out an an HTML table and giving it an xls extension.

Otherwise look at a component to do the creation:
http://officewriter.softartisans.com/officewriter-37.aspx
is a good one I think (but haven't used it myself)

Tim


David said:
Hello,
I want to create a C# application running on a Windows 2003 server.
This application retrieves data from a database, performs some
modifications then creates an Excel file on a shared folder on the
server. Then at any time, users on the network can get the file to see
the formatted data.
There is no web involved. It is a service running on the server that
creates periodically the Excel file.
 
Hi Tim,
it is quite simple content. A single sheet, no formula. Actually, it reports data on a formated way. i.e. Column Headers (font, color, etc), Date formats, number formats, etc.

I would really like the xml approach but how can I format the worksheet? I don't want to add VBA code in the Excel sheet?

OfficeWriter looks interesting but a bit pricey...

Thanks,
David.
 
A single HTML table should be fine: XL will render a lot of the same
style information (font size, color, bgcolor etc) used to format HTML
documents.

Even formulas are supported. Check the link below:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnoffxml/html/ofxml2k.asp


Tim.


David said:
Hi Tim,
it is quite simple content. A single sheet, no formula. Actually, it
reports data on a formated way. i.e. Column Headers (font, color,
etc), Date formats, number formats, etc.
I would really like the xml approach but how can I format the
worksheet? I don't want to add VBA code in the Excel sheet?
 
Is this also supported in Office XP and 2003?

Tim Williams said:
A single HTML table should be fine: XL will render a lot of the same
style information (font size, color, bgcolor etc) used to format HTML
documents.

Even formulas are supported. Check the link below:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnoffxml/html/ofxml2k.asp


Tim.



reports data on a formated way. i.e. Column Headers (font, color,
etc), Date formats, number formats, etc.
worksheet? I don't want to add VBA code in the Excel sheet?
 
Is this also supported in Office XP and 2003?

Tim Williams said:
A single HTML table should be fine: XL will render a lot of the same
style information (font size, color, bgcolor etc) used to format HTML
documents.

Even formulas are supported. Check the link below:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnoffxml/html/ofxml2k.asp


Tim.



reports data on a formated way. i.e. Column Headers (font, color,
etc), Date formats, number formats, etc.
worksheet? I don't want to add VBA code in the Excel sheet?
 
I know it's fine in XP: can't say for 2003 but I would suspect that is
also OK. It's easy enough to test.

Tim
 
Back
Top