Skip to main content
Participant
December 19, 2019
Question

指定したファイルに書き込むことはできませんでした。のエラーが発生する。

  • December 19, 2019
  • 3 replies
  • 3338 views

 

下記の質問と同様にMac OSの環境にて、PDFをExcelに書き出ししようとすると「指定したファイルに書き込むことはできませんでした。使用中の可能性があります。」のエラーが発生します。

実行しようとしているアクションは下記の通りです。

var fullPath = this.path; var fileName = this.documentFileName;

var naturalFileName = fileName.substring(0,fileName.length-4);

var tmpFolderPath = fullPath.substring(1,fullPath.length-fileName.length).replace("\\","\\\\");

var folderPath = tmpFolderPath.substring(0,1) + ":" + tmpFolderPath.substring(1,tmpFolderPath.length);

 

/* Excelファイルに変換して保存、閉じる*/

saveAs(folderPath + naturalFileName +".xlsx", "com.adobe.acrobat.xlsx");

 

 

指定したファイルに書き込むことはできませんでした。使用中の可能性があります。は下記の質問と同様ですが、まだ解決されておりません。

https://community.adobe.com/t5/acrobat/pdf%E3%82%92excel%E3%81%AB%E6%9B%B8%E3%81%8D%E5%87%BA%E3%81%97%E3%81%97%E3%82%88%E3%81%86%E3%81%A8%E3%81%99%E3%82%8B%E3%81%A8-%E6%8C%87%E5%AE%9A%E3%81%97%E3%81%9F%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%81%AB%E6%9B%B8%E3%81%8D%E8%BE%BC%E3%82%80%E3%81%93%E3%81%A8%E3%81%AF%E3%81%A7%E3%81%8D%E3%81%BE%E3%81%9B%E3%82%93%E3%81%A7%E3%81%97%E3%81%9F-%E4%BD%BF%E7%94%A8%E4%B8%AD%E3%81%AE%E5%8F%AF%E8%83%BD%E6%80%A7%E3%81%8C%E3%81%82%E3%82%8A%E3%81%BE%E3%81%99-%E3%81%AE%E3%82%A8%E3%83%A9%E3%83%BC%E3%81%AB%E3%81%AA%E3%82%8B/m-p/10697862#M226201

3 replies

Participant
February 12, 2022

見ず知らずのものですが、私も同じ方法でPDFをエクセル形式書き出すマクロがPCを更新してADOBEを新調してから動かなくなってしまっていましたが、以下のチェックを外したら動くようになりました。理由は分かりませんが、お試しください。

 

1.Adobe Acrobat Proの環境設定→セキュリティ(拡張)で

2.起動時に保護モードを有効にする(M)(プレビュー版)のチェックを外す。

 

以上です。

assause
Community Expert
Community Expert
December 19, 2019

スクリプトの前に、手動で同じ場所への書き出しはできるのでしょうか。

まず前提はそこになると思います。

 

なお質問する場合はOSバージョンやアプリケーションの具体的なバージョンも記載されたほうがいいでしょう。

ls_rbls
Community Expert
Community Expert
December 19, 2019

Hi,

 

please also share in which macOS version is this happening, what version of MS Office, version Acrobat Pro DC, or if the export is executed through a PDF Maker plugin.

 

Also, is this MS Excel file a copy of the source file that is being shared in a network environment?

 

what steps have you attempted to remedy this issue?

 

NOBU.OAuthor
Participant
December 19, 2019

Mac OS 10.15.1

 

Acrobat Pro DC  

Architecture: x86_64

Build: 19.21.20058.359605

I can't understand "the export is executed through a PDF Maker plugin." meaning.

 

エクセルはMacにはインストールしていない。

変換は、pdf2textへの変換だけでも良い。

対象のエクセルファイルはローカルのファイル変換を行う予定。

全てのappを落として、再起動をしたが、うまくいかなかった。

ls_rbls
Community Expert
Community Expert
December 19, 2019

 

Hi,

 

 The resulting data contained in the PDF that should open in a spreadsheet file is loosing  both the content and formatting  when you choose to save it as text.

 

Shouldn't you be exporting to a CSV file instead of text?

 

Since I  don't know what exactly you are trying to achieve makes it hard to ask or even suggest what you can do.

 

As a matter of fact , are you actually using Adobe Acrobat Pro DC conversion tools or are you trying tu run a Save As javascript  custom action from within the PDF document?