23-02-23, 12:23 PM
وجدت الحل والحمد لله في هذا الكود
كود :
Dim Excel
Dim ExcelDoc
'Opens the Excel file'
Excel = CreateObject("Excel.Application")
ExcelDoc = Excel.Workbooks.open("C:\Users\alsaa\Desktop\55555\www.xlsx")
'Creates the pdf file'
Excel.ActiveSheet.ExportAsFixedFormat(0, "C:\Users\alsaa\Desktop\55555\www.pdf", 0, 1, 0, , , 0)
'Closes the Excel file'
Excel.ActiveWorkbook.Close()
Excel.Application.Quit()