开发者

Can we export Excel spreadsheet into XML and apply stylesheet to transform to another format?

开发者 https://www.devze.com 2023-03-26 14:27 出处:网络
I have an excel spreadsheet which has one worksheet. The work sheet has 50 columns and 1000+ rows. And I want to transform the data inside the excel spreadsheet into another custom format.

I have an excel spreadsheet which has one worksheet. The work sheet has 50 columns and 1000+ rows. And I want to transform the data inside the excel spreadsheet into another custom format.

Is it possible to use xml+xslt to transform the data inside the excel worksheet into another format - as I've 开发者_如何学Gorecently read that excel data is xml under the hood? My programming language of choice is C# (incase that is required)

Thank you


in theory yes but I think this could be rather complex...

Another approach is to use OpenXML SDK from MS - see http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=5124

For some starting points

http://msdn.microsoft.com/en-us/library/bb456488.aspx
http://www.microsoft.com/download/en/details.aspx?id=17985
http://openxmldeveloper.org/blog/b/openxmldeveloper/archive/2009/06/02/4730.aspx
http://www.codeproject.com/KB/office/ExcelOpenXMLSDK.aspx

IF you need more (like rendering to high-quality PDF etc.) then there are several 3rd-party libraries available (like Flexcel, Aspose.Cells, SpreadsheetGear...).

0

精彩评论

暂无评论...
验证码 换一张
取 消