// Exports wchar_t wzXLSFileFormat[MAXPATH] = { 0 }; // Legacy Export is needed after LL version 26 const bool NeedLegacyExport = LlGetVersion && LlGetVersion(LL_VERSION_MAJOR) >= 26; // Legacy export resets parameters, storing default excel file format if(NeedLegacyExport) { nRet = LlXGetParameterW(hJob, LL_LLX_EXTENSIONTYPE_EXPORT, L"XLS", L"XLS.FileFormat", wzXLSFileFormat, ARRAYSIZE(wzXLSFileFormat)); } LlSetOptionStringW(hJob, LL_OPTIONSTR_EXPORTS_ALLOWED, L"FILE;PRV;HTML;RTF;PDF;MHTML;XML;PICTURE_JPEG;" "PICTURE_EMF;PICTURE_BMP;XLS;TXT;CSV"); // Allow legacy exporters (JQM, HTML) if(NeedLegacyExport) LlSetOptionStringW(hJob, LL_OPTIONSTR_LEGACY_EXPORTERS_ALLOWED, L"HTML"); // Predefined selections for Print options dialog LlPrintSetOption(hJob, LL_PRNOPT_COPIES, LL_COPIES_HIDE); LlPrintSetOption(hJob, LL_PRNOPT_STARTPAGE, 1); // Legacy export resets parameters, restoring default excel file format. // We suspect that all the other properties defined in the designer // are also reverted to their predefined values. if(NeedLegacyExport) { nRet = LlXSetParameterW(hJob, LL_LLX_EXTENSIONTYPE_EXPORT, L"XLS", L"XLS.FileFormat", wzXLSFileFormat); } if((LlPrintOptionsDialogW(hJob, Handle, L"Select printing options.")) < 0) { LlPrintEnd(hJob, 0); CloseJob(); return; }