Skip to main content

When using the saveasfixedformat function to save an excel to pdf, it always gives an error when executing.

How must it be defined for it to work?

The parameters in Vb are

**[Class: @_Worksheet] ExportAsFixedFormat
* METHOD, 2493, @ExportAsFixedFormat,
* "XlFixedFormatType" @Type, TYPE 3,
* "VARIANT" @Filename, TYPE 12,
* "VARIANT" @Quality, TYPE 12,
* "VARIANT" @IncludeDocProperties, TYPE 12,
* "VARIANT" @IgnorePrintAreas, TYPE 12,
* "VARIANT" @From, TYPE 12,
* "VARIANT" @To, TYPE 12,
* "VARIANT" @OpenAfterPublish, TYPE 12,
* "VARIANT" @FixedFormatExtClassPtr, TYPE 12
* OPTIONAL 8

 

The parameters that I am using in acucobol are

 modify hexcelbook @ExportAsFixedFormat
 ("xlTypePDF","c:\\tmp\\test.pdf","xlQualityStandard")

or

 modify hexcelbook @ExportAsFixedFormator (BY NAME @Type = "xlTypePDF"
 BY NAME @Filename = "C:/TMP/TEST.PDF")
 BY NAME @Quality = "xlQualityStandard"
 BY NAME @IncludeDocProperties = 1
 BY NAME @IgnorePrintAreas = 0 AS VT-BOOL
 BY NAME @OpenAfterPublish = 0 AS VT-BOOL)