【问题标题】:FoxitPhantom pdf to Excel AutomationFoxitPhantom pdf 转 Excel 自动化
【发布时间】:2021-04-16 17:05:04
【问题描述】:

您好,我有一个 pdf 文件(路径),我想将其转换为 excel 文件。我用的是福昕魅影。我已经将 api 手册用于参考,但我无法弄清楚。 (http://cdn01.foxitsoftware.com/pub/foxit/manual/phantom/en_us/API%20Reference%20for%20Application%20Communication.pdf) 该文件只是一个带有随机值的 pdf。我有图书馆 PhantomPDF

Sub convert()

Dim phApp As PhantomPDF.Application
Set phApp = CreateObject("PhantomPDF.Application")
Dim phCreator As PhantomPDF.Document
Set phCreator = phApp.CurrentDocument
Dim hresult As Variant
Dim path As String
path = "C:\Users\plfournier\Documents\test.pdf"

hresult = phCreator.OCRAndExportToExcel(path, 1, 1, True)

End Sub

【问题讨论】:

  • 运行这个会发生什么?
  • 它无法识别函数 OCRAndExportToExcel
  • 这里的phApp.CurrentDocument 是什么?您似乎没有打开任何文档。命令OCRAndExportToExcel ls 应该在已经打开的文档上运行。 path 应该是您要放置在此过程中创建的 Excel 文件的路径。 cdn01.foxitsoftware.com/pub/foxit/manual/phantom/en_us/…

标签: excel vba foxit


【解决方案1】:
Sub convert()

    Dim phApp As PhantomPDF.Application

    Dim phCreator As PhantomPDF.Document
    Dim hresult As Variant
    Dim path As String

    Set phApp = CreateObject("PhantomPDF.Application")
    Set phCreator = phApp.CurrentDocument
    path = "C:\Users\39340\Downloads\90-21 DN16 CONTACT.xls"

    phCreator.OCRAndExportToExcel path, 1, 1, True, True

End Sub

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2010-09-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-10-21
    • 1970-01-01
    • 2015-11-14
    • 1970-01-01
    相关资源
    最近更新 更多