We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
# poexcel.api.excel # line:71 # def excel2pdf(excel_path, pdf_path, sheet_id: int = 0): # mainExcel.excel2pdf(excel_path, pdf_path, sheet_id)
sheet_id设定了默认值0. 在office.api.excel.excel2pdf的定义种并没有提供sheet_id参数
# poexcel.core.ExcelType.MainExcel.excel2pdf # line:149 # sheet = book.sheets[sheet_id] # sheet.to_pdf(path=pdf_path_name, show=False)
这里仅读取了sheet_id对应的sheet并转换为pdf.由于sheet_id是固定值,因此只能转换首个工作表. 可以将 poexcel.core.ExcelType.MainExcel.excel2pdf line165: sheet.to_pdf(path=pdf_path_name, show=False) 修改为: book.to_pdf(path=pdf_path_name, show=False,include=sheet_id) 并且修改 poexcel.api.excel line:71 def excel2pdf(excel_path, pdf_path, sheet_id: int = 0): 为: def excel2pdf(excel_path, pdf_path, sheet_id: int = None):
sheet.to_pdf(path=pdf_path_name, show=False)
book.to_pdf(path=pdf_path_name, show=False,include=sheet_id)
def excel2pdf(excel_path, pdf_path, sheet_id: int = 0):
def excel2pdf(excel_path, pdf_path, sheet_id: int = None):
The text was updated successfully, but these errors were encountered:
好主意!要不你直接提一个pull request? 源码地址👉https://github.com/CoderWanFeng/poexcel
Sorry, something went wrong.
提交了
No branches or pull requests
sheet_id设定了默认值0.
在office.api.excel.excel2pdf的定义种并没有提供sheet_id参数
这里仅读取了sheet_id对应的sheet并转换为pdf.由于sheet_id是固定值,因此只能转换首个工作表.
可以将 poexcel.core.ExcelType.MainExcel.excel2pdf line165:
sheet.to_pdf(path=pdf_path_name, show=False)
修改为:
book.to_pdf(path=pdf_path_name, show=False,include=sheet_id)
并且修改 poexcel.api.excel line:71
def excel2pdf(excel_path, pdf_path, sheet_id: int = 0):
为:
def excel2pdf(excel_path, pdf_path, sheet_id: int = None):
The text was updated successfully, but these errors were encountered: