These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Export one Excel Worksheet to pdf using javascript

RGingerich
Registered: Nov 24 2010
Posts: 1

Greetings All,
 
I've been working on a script to automate the production of a single pdf that has pages inserted from multiple sources (Word, Excel, and other pdfs). The script exports on the fly from those sources not already saved as a pdf. I'm running the script as a menu item at the app folder level through a trusted function. This issue I am having is that I am not able to specify which worksheet I want to convert to pdf from Excel. Here is an excerpt:
var test = app.openDoc({
cPath: "C:/TestGraphs.xls",
cDest: "TestChart",
bUseConv: true
});
The cDest property doesn't seem to be working for me. Is there a better way to do this? Any suggestions are appreciated. Oh, I am developing this in Acrobat 9 Pro but need it to run in Acrobat 9 Standard.
 
Thanks!

try67
Expert
Registered: Oct 30 2008
Posts: 2398
cDest only applies when you open a PDF.
Also, your path is not correct. You need to use the proper syntax, like so: /C/TestGraphs.xls

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com