Excel saves spreadsheets in XML format, so you can use XSLT to transform your customer's spreadsheet into HTML. The Excel XML format is somewhat obtuse, but if you only need to grab certain pieces of critical data, it's a reasonable solution. Here's some information about the Excel XML format, though Googling will probably reveal more:
XSLT is a declarative XML transformation language, which you would have to learn the fundamentals of for this job, but it's a very useful tool if you deal with XML generally, and the additional virtue of this solution is that it is repeatable (when the customer's data changes).
EDIT: Here's an XSLT tutorial, which is obviously a more friendly introduction to the language than the W3C standard:
If the price list only gets updated every now and again, can you not simply save the spreadsheet file as an HTML page from within Excel? This will give you some pretty nasty HTML (thanks MS), but it's a good starting point.
(As JollyMorphic points out, you can also transform Excel's XML, but that's quite heavy duty for what you appear to need).
发布评论
评论(2)
Excel 以 XML 格式保存电子表格,因此您可以使用 XSLT 将客户的电子表格转换为 HTML。 Excel XML 格式有些迟钝,但如果您只需要获取某些关键数据,那么它是一个合理的解决方案。以下是有关 Excel XML 格式的一些信息,但 Google 可能会显示更多信息:
http://msdn.microsoft.com/en-us/library/aa140066%28office.10%29.aspx
这是 XSL 1.0 的 W3C 标准(我怀疑您是否需要 2.0 功能,这对于这项工作来说更复杂):
http://www.w3.org/TR/xslt
XSLT 是一种声明性 XML 转换语言,您必须学习该语言的基础知识才能完成这项工作,但如果您通常处理 XML,那么它是一个非常有用的工具,并且该解决方案的另一个优点是它是可重复的(当客户数据变更)。
编辑:这是一个 XSLT 教程,这显然是比 W3C 标准更友好的语言介绍:
http:// www.w3schools.com/xsl/
Excel saves spreadsheets in XML format, so you can use XSLT to transform your customer's spreadsheet into HTML. The Excel XML format is somewhat obtuse, but if you only need to grab certain pieces of critical data, it's a reasonable solution. Here's some information about the Excel XML format, though Googling will probably reveal more:
http://msdn.microsoft.com/en-us/library/aa140066%28office.10%29.aspx
And here's the W3C standard for XSL 1.0 (I doubt you would need 2.0 features, which are more complex, for this job):
http://www.w3.org/TR/xslt
XSLT is a declarative XML transformation language, which you would have to learn the fundamentals of for this job, but it's a very useful tool if you deal with XML generally, and the additional virtue of this solution is that it is repeatable (when the customer's data changes).
EDIT: Here's an XSLT tutorial, which is obviously a more friendly introduction to the language than the W3C standard:
http://www.w3schools.com/xsl/
如果价目表只是时不时地更新,您是否不能简单地从 Excel 中将电子表格文件另存为 HTML 页面?这会给你一些非常讨厌的 HTML(感谢 MS),但这是一个很好的起点。
(正如 JollyMorphic 指出的那样,您还可以转换 Excel 的 XML,但这对于您的需要来说是相当繁重的任务)。
If the price list only gets updated every now and again, can you not simply save the spreadsheet file as an HTML page from within Excel? This will give you some pretty nasty HTML (thanks MS), but it's a good starting point.
(As JollyMorphic points out, you can also transform Excel's XML, but that's quite heavy duty for what you appear to need).