Question

I'd love to use PDFCreator to create PDF files from excel ones (.xlsx). I cannot use MS Office.

I've downloaded PDFCreator and tried to print .docx with command:

PDFCreator.exe /PF"myfile.docx"

No problem with this one because Wordpad is used to send .docx file to PDFCreator.

I've installed Microsoft Excel Viewer to open and print Excel files. When I open Excel Viewer I can use PDFCreator as virtual printer to print PDF. However, when I try to use PDFCreator from command line:

PDFCreator.exe /PF"excel.xlsx"

nothing happens - only popup with file selection is displayed - I've found out this popup is displayed by Excel Viewer to open specific file.

My question is:

1) is there any option to use PDFCreator from command line to print XLS files when MS Office is not available?

2) are there any command line arguments for Excel Viewer to print file? I have so far XLVIEW.EXE "filename.xlsx"

Requirements:

  • whole process has to be automated (that's why I use command line arguments)

  • MS Office cannot be used (due to licenses)

  • free for commercial use/use on server

Thanks!

Was it helpful?

Solution 2

See EDIT3 below

If you look here: http://www.excelguru.ca/content.php?181 you will see excel VB code that can be run to do this. You can run that code from the command line using something like this:

c:\filename.vbs

That will start up VB script. VB Script is part of excel so that does not cost any more, there is no problem with licenses and you do not have to use Word.

I assume that you have Excel available Or is that what you mean by Office not being available? In your second question you indicate that Excel is available.

EDIT3:

Try installing OpenOffice (http://www.openoffice.org/). That will allow you to Open Excel documents without having Excel installed. It is free so there should be no license problem.

The following site shows you how to open the spreadsheet portion of OpenOffice from the command line: http://wiki.openoffice.org/wiki/Documentation/OOoAuthors_User_Manual/Getting_Started/Starting_from_the_command_line

The last paragraph of the following page indicates that you can convert from an Excel spreadsheet to PDF http://www.openoffice.org/product/calc.html

And most importantly this page shows how to convert an Excel ss to PDF using OpenOffice from the command line http://forum.openoffice.org/en/forum/viewtopic.php?f=9&t=32069

OTHER TIPS

I ran into this problem using PDFCreator and Excel Viewer 12 (the latest download from Microsoft). However, I discovered that everything works fine with Excel Viewer 2003. Obviously this only works with the .xls format.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top