简体   繁体   English

将 XML Excel 电子表格转换为 PDF 的第三方工具

[英]third party tool to conver XML Excel spreadsheets into PDF

I'm using CarlosAg ExcelXmlWriter library which generates XML Excel spreadsheets 2003 (*.xml)我正在使用生成 XML Excel 电子表格 2003 (*.xml) 的 CarlosAg ExcelXmlWriter 库

I need to find coomercial or free tool just that converts this generated xml spreadsheet into PDF. I tried SautinSoft library but it didn't work with my desired extension (xml) it only works with xlsx or xls extesnions我需要找到商业或免费工具,将生成的 xml 电子表格转换为 PDF。我尝试了 SautinSoft 库,但它不适用于我想要的扩展名 (xml),它仅适用于 xlsx 或 xls 扩展

thanks guys in advance提前谢谢大家

Try Aspose.尝试 Aspose。

http://www.aspose.com/categories/.net-components/aspose.cells-for-.net/default.aspx http://www.aspose.com/categories/.net-components/aspose.cells-for-.net/default.aspx

You might also need the PDF component, not sure how they do it now.您可能还需要 PDF 组件,不确定他们现在是怎么做的。

Can you simply use some pdf printer to do it?你能简单地使用一些 pdf 打印机来做吗?

Try to use a free solution (EpPlus): https://github.com/EPPlusSoftware/EPPlus Or SpreadSheet https://spreadsheetlight.com/ An another way:尝试使用免费解决方案 (EpPlus): https://github.com/EPPlusSoftware/EPPlus或 SpreadSheet https://spreadsheetlight.com/另一种方式:

  static void ConvertFromStream()
    {

      
        // The conversion process will be done completely in memory.
        string inpFile = @"..\..\..\example.xml";
        string outFile = @"ResultStream.pdf";
        byte[] inpData = File.ReadAllBytes(inpFile);
        byte[] outData = null;

        using (MemoryStream msInp = new MemoryStream(inpData))
        {

            // Load a document.
            DocumentCore dc = DocumentCore.Load(msInp, new XMLLoadOptions());

            // Save the document to PDF format.
            using (MemoryStream outMs = new MemoryStream())
            {
                dc.Save(outMs, new PdfSaveOptions() );
                outData = outMs.ToArray();                    
            }
            // Show the result for demonstration purposes.
            if (outData != null)
            {
                File.WriteAllBytes(outFile, outData);
                System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo(outFile) { UseShellExecute = true });
            }
        }

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 导入Excel电子表格的工具 - Tool for importing excel spreadsheets 通过编程无需任何第三方工具即可将PDF文档转换为Word文档(SSRS 2005) - Convert PDF document to Word document by programmatically without any third party tool (SSRS 2005) 如何在不使用任何第三方工具的情况下将流转换为Excel工作表(.xls和.xlsx) - How to convert stream into Excel sheet (.xls and .xlsx) without any third party tool 第三方对象的xml序列化 - xml serialization of third party object 是否有支持.NET4的第三方软件包工具? - Is there third party package tool with .NET4 support? 是否有任何第三方工具可以将XML数据导入Excel? - Are there any third-party tools which allow importing XML data into Excel? 以编程方式或第三方工具将Office文档转换为XPS文件 - Convert Office Documents to XPS File Programatically or Third Party tool 任何可用于多个文件上传的第三方工具 - any third party tool available for multiple file uploads MVC3 中的站点地图,无需使用任何第三方工具 - Sitemap in MVC3 without using any third party tool .net中的哪个第三方库可以正确确定pdf是否损坏? - What third party library in .net that could properly determine if the pdf is corrupted or not?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM