It is currently Thu Jan 28, 2021 3:04 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: COMatePLUS....excel save as PDF
PostPosted: Mon Dec 16, 2019 2:43 pm 
Offline
User
User

Joined: Thu Mar 10, 2016 8:00 am
Posts: 26
Dear, I need to save excel file as PDF. Do we have such option in ExcelFunktion/COMatePLUS?

following is powershell script which can do quite similar...

Code:
$path = “F:\”
$xlFixedFormat = “Microsoft.Office.Interop.Excel.xlFixedFormatType” -as [type]
$excelFiles = Get-ChildItem -Path $path -include *.xlsx -recurse
$objExcel = New-Object -ComObject excel.application
$objExcel.visible = $false
foreach($wb in $excelFiles)
{
 $filepath = Join-Path -Path $path -ChildPath ($wb.BaseName + “.pdf”)
 $workbook = $objExcel.workbooks.open($wb.fullname, 3)
 $workbook.Saved = $true
“saving $filepath”
 $workbook.ExportAsFixedFormat($xlFixedFormat::xlTypePDF, $filepath)
 $objExcel.Workbooks.close()
}
$objExcel.Quit()


I also found in ExcelConstantsPlus
Code:
;--#xlFixedFormatType
#xlTypePDF = 0
#xlTypeXPS = 0


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 47 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye