作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我需要调用一个函数来保存 Excel 工作簿。我安装了 Excel 2007 的 PDF 保存插件,但现在我需要知道保存 Excel 文件时文件格式的数字代码是什么。
可在此处找到 Excel 文件格式数字的示例。
http://www.dailydoseofexcel.com/archives/2006/10/29/saveas-in-excel-2007/
FileExtStr = ".xlsb": FileFormatNum = 50
FileExtStr = ".xlsx": FileFormatNum = 51
FileExtStr = ".xlsm": FileFormatNum = 52
FileExtStr = ".xls": FileFormatNum = 56
FileExtStr = ".csv": FileFormatNum = 6
FileExtStr = ".txt": FileFormatNum = -4158
FileExtStr = ".prn": FileFormatNum = 36
我需要 .pdf 结尾的一个。
最佳答案
查看 Workbook.ExportAsFixedFormat
方法:
ActiveWorkbook.ExportAsFixedFormat Type:=xlTypePDF
FileName:=“sales.pdf”
Quality:=xlQualityStandard
DisplayFileAfterPublish:=True
此方法应该优于使用 SaveAs
,因为它还允许指定所有 PDF/XPS 选项。
注意:此方法已添加到 Excel 2007 的 Excel 对象模型中,并且需要 Save as PDF or XPS Add-in用于安装 2007 Microsoft Office 程序。
关于excel - 通过 API 将文件另存为 PDF 所需的 Excel 2007 中 PDF 的文件类型号是多少?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/738829/
我有 json 数据: { "products": [ { "productId" : 0, "productImg" : "../img/product-ph
我是一名优秀的程序员,十分优秀!