本文介绍了如何使用Windows窗体应用程序将pdf文件转换为Excel的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
任何人都可以帮我解决代码???
Can anyone please help me with code???
推荐答案
请尝试任何第三方SDK,允许您编写最少的代码以满足所需的工作。我尝试过ByteScout PDF SDK,它为您提供了更大的灵活性和易于集成。下面是在C#中将PDF转换为Excel的示例代码
Please try any third party SDK, which allows you to write minimal code to for required work. I have tried ByteScout PDF SDK which give you more flexibility and easy integration. Below is the sample code to convert PDF to excel in C#
// Create Bytescout.PDFExtractor.XLSExtractor instance
<span data-scayt_word="CSVExtractor" data-scaytid="6">CSVExtractor</span> extractor = new <span data-scayt_word="XLSExtractor" data-scaytid="7">XLSExtractor</span>();
extractor.RegistrationName = "demo";
extractor.RegistrationKey = "demo";
File.Delete("output.xls");
// Load sample PDF document
extractor.LoadDocumentFromFile("sample3.pdf");
// Save the spreadsheet to file
extractor.SaveAsXLSFile("output.xls");
// Open the spreadsheet in default associated application
Process.Start("output.xls");
根据需要自定义根据您的要求。
Customize it according to your requirement.
这篇关于如何使用Windows窗体应用程序将pdf文件转换为Excel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!