pdf转换成excel文件_将PDF文件转换为Excel

pdf转换成excel文件

pdftoexcelconverter00

When I got back to my office after a recent vacation, there was an email from Una, about a PDF to Excel conversion service, that she asked me to try.

最近的假期后,当我回到办公室时,Una收到一封电子邮件,内容涉及PDF到Excel的转换服务,她请我尝试一下。

There was also a big pile of emails from family, friends and clients, with more urgent requests. So, Una's email got dropped into the Follow Up folder, with little chance of being looked at again.

来自家人,朋友和客户的电子邮件也很多,有更紧急的请求。 因此,Una的电子邮件被放入了Follow Up文件夹中,几乎没有机会再次被查看。

Until today. And I'm very glad that I read that email – it saved me a few hours of work, and that will save my client some money!

直到今天。 我很高兴看到这封电子邮件-它节省了我几个小时的工作,这将为我的客户节省一些钱!

避免数据输入 (Avoiding Data Entry)

Today I met with a client who needs an insurance quote calculator updated. In the new version, we need to add a long list of motorcycle makes and models.

今天,我遇到了一位需要更新保险报价计算器的客户。 在新版本中,我们需要添加一长串摩托车品牌和型号。

They gave me a printed copy of the manual, and it has several pages of lists that we need to add in the update. I asked if they could get an Excel or Word version of the manual, so we could copy the data from there, into our calculator file.

他们给了我手册的印刷版,其中有几页列表,我们需要在更新中添加。 我问他们是否可以获得该手册的Excel或Word版本,因此我们可以从那里将数据复制到我们的计算器文件中。

Even a PDF file would be better than nothing, so I asked for that, as a third option. I figured that I could use Adobe Acrobat to extract the text somehow, if a PDF file was all that we could get.

甚至PDF文件总比没有好,所以我要求这样做,作为第三个选择。 我认为,只要我们能得到PDF文件,我就可以使用Adobe Acrobat以某种方式提取文本。

And, of course, a PDF file was the only option available.

而且,当然,PDF文件是唯一可用的选项。

转换PDF文件 (Convert a PDF File)

When my client sent the PDF file, I remembered Una's email, and dug it out of the Follow Up pile. Here's what she said about the PDF to Excel conversion service that she is promoting.

当我的客户发送PDF文件时,我想起了Una的电子邮件,并将其从“后续跟进”列表中挖出。 这是她对正在推广的PDF到Excel转换服务的看法。

It is a free online PDF to Excel conversion service - http://www.pdftoexcelconverter.net  .

它是一个免费的在线PDF至Excel转换服务-http: //www.pdftoexcelconverter.net

There are only few similar tools around and this tool has following advantages over them:

周围只有很少的类似工具,该工具相对于它们有以下优点:

  1. It has no significant file size limitations (documents of up to 30MB can be converted)

    它没有明显的文件大小限制(最多可以转换30MB的文件)
  2. It's web based and it requires no installation on the computer

    它是基于Web的,不需要在计算机上进行安装
  3. The table data in the PDF will be accurately represented

    PDF中的表格数据将准确显示
  4. As stated in our Privacy Policy user documents and email addresses are 100% safe.

    如我们的隐私政策所述,用户文档和电子邮件地址是100%安全的。

Hmmm…Free…and safe…and free.

嗯...免费...又安全又免费。

So, I clicked the link to the website, and uploaded the motorcycle manual. For some reason, I had to click the Browse button twice, before it worked.

因此,我单击了网站链接,并上传了摩托车手册。 由于某种原因,我必须单击两次“浏览”按钮,然后才能起作用。

pdftoexcelconverter01

In Step 2, I entered my email address, and click the Send button.

在步骤2中,我输入了我的电子邮件地址,然后单击“发送”按钮。

pdftoexcelconverter05

The file was about 3 MB and uploaded in about one minute.

该文件约为3 MB,并在大约一分钟内上传。

pdftoexcelconverter02

Less than a minute later, there was an email from the website, with a link where I could download my converted file.

不到一分钟后,该网站收到一封电子邮件,其中包含一个链接,我可以在其中下载转换后的文件。

数据从PDF文件转换为Excel (Data Converted to Excel from a PDF File)

The email told me to click on the link below, and I did.

电子邮件告诉我单击下面的链接,我做到了。

pdftoexcelconverter04

However, I didn't notice that the first link was within the "Advertisement" section, and it took me to a product page for Investintech. They showed some of their fine paid products, like Able2Extract Pro, which I have used in the past, to convert PDF files to Excel. I didn't want to buy anything though – I wanted to download my file.

但是,我没有注意到第一个链接是在“广告”部分中的,它使我进入了Investintech的产品页面。 他们展示了一些高价产品,例如我过去使用过的Able2Extract Pro ,可以将PDF文件转换为Excel。 不过,我不想购买任何东西–我想下载文件。

I went back to the email, and scrolled down a bit further. There was the download link, for my converted Excel file. Clicking that took me to a page with a download link.

我回到了电子邮件,然后向下滚动了一下。 有我转换后的Excel文件的下载链接。 点击后,我进入了带有下载链接的页面。

The instructions say to click the link, but it should tell you to click the button – that link isn't clickable.

说明说要单击链接,但它应该告诉您单击按钮–该链接不可单击。

pdftoexcelconverter03

The file downloaded quickly, and when it opened, I was very impressed with the results. The tables were in good shape, and the lists will be easy to copy and paste into our Motorcycle Calculator file. I won't have to spend a few hours typing those lists in the Excel file, or trying to convince someone else to do it!

该文件下载很快,打开后,结果给我留下了深刻的印象。 表格状态良好,列表很容易复制并粘贴到我们的Motorcycle Calculator文件中。 我不必花几个小时就可以在Excel文件中键入这些列表,也不必试图说服其他人去做!

桌面PDF至Excel转换器 (Desktop PDF to Excel Converter)

The http://www.pdftoexcelconverter.net website states that your privacy will be protected, but if you're trying to convert confidential documents, you can use a desktop PDF converter instead. You'll sleep better at night, knowing that all your files are securely locked up, with no possibility of accidentally going astray.

http://www.pdftoexcelconverter.net网站指出,您的隐私将受到保护,但是,如果您要转换机密文档,则可以使用桌面PDF转换器。 知道您的所有文件都已安全锁定,并且不会因误入歧途而被盗,晚上您会睡得更好。

As I mentioned, I've used Able2Extract Pro, and found it easy to use, with excellent conversion results. Unfortunately, I didn't have a copy available today, but this file wasn't confidential, so the online version was fine for this conversion.

正如我提到的,我已经使用Able2Extract Pro ,发现它易于使用,转换效果极佳。 不幸的是,我今天没有可用的副本,但是此文件不是机密信息,因此在线版本适用于此转换。

将PDF转换为Word失败 (Convert PDF to Word Failure)

As a side note, I also tried converting the PDF file to Word, to see if the lists would be easier to copy and paste. I used the PDF to Word site, operated by Nitro, and the upload went well.

附带说明,我还尝试将PDF文件转换为Word,以查看列表是否易于复制和粘贴。 我使用了由Nitro运营的PDF to Word网站,并且上传顺利。

pdftoexcelconverter06

About 6 hours later, I got an email that said, "Sorry, an unexpected conversion failure occurred when converting your file." Good thing that I wasn't depending on that site for a quick solution to my problem!

大约6小时后,我收到一封电子邮件,内容为:“抱歉,转换文件时发生意外的转换失败。” 好东西,我不依赖该站点来快速解决我的问题!

翻译自: https://contexturesblog.com/archives/2012/03/15/convert-pdf-file-to-excel/

pdf转换成excel文件

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
要将PDF文件转换Excel,可以考虑使用第三方库或在线转换工具。 1. 使用第三方库 可以使用 PHPExcel 库来处理 Excel 文件。首先需要将 PDF 文件转换为 CSV 文件,然后再使用 PHPExcel 将 CSV 文件转换Excel 文件。 以下是示例代码: ```php require_once 'PHPExcel/Classes/PHPExcel.php'; require_once 'PHPExcel/Classes/PHPExcel/IOFactory.php'; // Convert PDF to CSV using pdftotext command $pdf_file = 'example.pdf'; $csv_file = 'example.csv'; shell_exec("pdftotext -layout $pdf_file $csv_file"); // Load CSV file into PHPExcel $objPHPExcel = PHPExcel_IOFactory::load($csv_file); // Save as Excel file $excel_file = 'example.xlsx'; $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); $objWriter->save($excel_file); ``` 2. 使用在线转换工具 可以使用在线转换工具如 Zamzar、PDFTables、SmallPDF 等将 PDF 文件转换Excel 文件。这些工具都提供了 API 或 SDK 可以与 PHP 集成使用。 以下是示例代码: ```php // Using Zamzar API $source_file = 'example.pdf'; $target_format = 'xlsx'; $zamzar_api_key = 'your_zamzar_api_key'; $zamzar_url = "https://api.zamzar.com/v1/jobs"; $data = array( "source_file" => curl_file_create($source_file), "target_format" => $target_format ); $headers = array( "Content-Type: multipart/form-data", "Accept: application/json", "Authorization: Basic " . base64_encode($zamzar_api_key . ":") ); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $zamzar_url); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $result = curl_exec($ch); curl_close($ch); $job = json_decode($result); // Check status of the job $job_id = $job->id; $zamzar_api_key = 'your_zamzar_api_key'; $zamzar_url = "https://api.zamzar.com/v1/jobs/$job_id"; $headers = array( "Content-Type: application/json", "Accept: application/json", "Authorization: Basic " . base64_encode($zamzar_api_key . ":") ); while (true) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $zamzar_url); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $result = curl_exec($ch); curl_close($ch); $job = json_decode($result); if ($job->status == "successful") { // Download Excel file $excel_url = $job->target_files[0]->url; $excel_file = 'example.xlsx'; file_put_contents($excel_file, file_get_contents($excel_url)); break; } elseif ($job->status == "failed") { // Handle error break; } else { // Wait and check again sleep(5); } } ``` 注意:使用在线转换工具需要提供 API 密钥,并且可能需要付费。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值