TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask YC: Excel Generation (Server Side)?

9 点作者 erictobia超过 16 年前
I was curious to know if anyone could recommend a component for server side excel generation (both xls and xlsx) for an ASP.NET application. We cannot install Office on the server. We've been using this component from codeplex...<p>http://www.codeplex.com/ExcelPackage<p>...and we haven't been thrilled with it. We're open to a commercial solution - we're just not sure what the best option is.<p>Thanks in advance for any suggestions.

9 条评论

PeterHammar超过 16 年前
I've used 2 methods:<p>1: SpreadsheetML: You can output XML which is understood by excel, here is an introduction: <a href="http://msdn.microsoft.com/en-us/library/bb226687" rel="nofollow">http://msdn.microsoft.com/en-us/library/bb226687</a>(office.11).aspx<p>2: Insert values into an existing template.xls which is accessed with sql using an Oledbconnection. The template can have existing charts which will get updated with the new values.
jasonkester超过 16 年前
You haven't said what you're trying to put into that Excel spreadsheet. If it's just rows of text, numbers, and formulas, then it's dead simple.<p>- change your response mime-type to application/excel<p>- supply a filename ending with .xls<p>- output comma-separated text.<p>done.<p>(it only gets difficult if you need to start embedding charts and specifying fonts)
评论 #298398 未加载
jharrison超过 16 年前
When I was at Bank of America I worked on an internal Project Management tool that used a ton of Excel spreadsheets. If you can start with some kind of template it becomes dead simple. Excel spreadsheets can be used as datasources without Excel being installed on the server (iirc). Our app just connected to the XLS and dumped the data into the existing columns. If you have charts based on those columns then you're good to go.<p>Of course if you can't start with a template or need to add columns on the fly...it might be a little more challenging.
stsamuel超过 16 年前
We use FlexCel (<a href="http://www.tmssoftware.com/site/flexcel.asp" rel="nofollow">http://www.tmssoftware.com/site/flexcel.asp</a>) for some very complex .NET excel and PDF generation, and have been very happy with it. Nice clean interfaces and easy to customize.
mrtron超过 16 年前
I know of a lib for Python but it only produces xls.<p><a href="http://sourceforge.net/projects/pyexcelerator" rel="nofollow">http://sourceforge.net/projects/pyexcelerator</a><p>If you are using ASP.NET why can't you install Office on the server?
评论 #298393 未加载
keefe超过 16 年前
<a href="http://en.wikipedia.org/wiki/Office_Open_XML" rel="nofollow">http://en.wikipedia.org/wiki/Office_Open_XML</a> Generating files with this XML format should let you get something into excel. The only others I know of are Java based as I'm fairly anti-ms : <a href="http://poi.apache.org/" rel="nofollow">http://poi.apache.org/</a> and <a href="http://jexcelapi.sourceforge.net/" rel="nofollow">http://jexcelapi.sourceforge.net/</a>
andr超过 16 年前
XLSX is zipped XMLs, so you might try reverse-engineering. Also consider having a static XLS which imports data from a web-based CSV.
speby超过 16 年前
Have you looked at the Apache POI project? Not sure if it can do XLSX yet, though.
评论 #298387 未加载
ntoshev超过 16 年前
Doesn't CSV work for you? I think Excel even parses formulas in CSVs.