Can not convert large .xlsx file in PDF by using Libra Macro

a. It has found that Macro which we are using for conversion between Excel / PPT / Word file to PDF, that cause once source file consumes more memory.
b. It cause to convert .xlsx file. While working fine with normal .xls file.
c. It cause while convert 20,000+ line excel .xls file with PDF, internally that also convert style of cell in a PDF file.

Sub ConvertExcelToPDF( cSourceFile , cDestinationFile)
cURL = ConvertToURL( cSourceFile )
’ Open the document.
’ Just blindly assume that the document
’ is of a type that OOo will
’ correctly recognize and open –
’ without specifying an import filter.

oDoc = StarDesktop.loadComponentFromURL( cURL, “_blank”, 0, _
Array(MakePropertyValue( “Hidden”, True ),) )

cURL = ConvertToURL( cDestinationFile )
On Error GoTo ErrorHandler
’ Save the document using a filter.
oDoc.storeToURL( cURL, _
Array(MakePropertyValue( “FilterName”, “calc_pdf_Export” ),)

oDoc.close( True )

  ErrorHandler:
  
 Exit Sub

End Sub