Adatta Tutte le Colonne del Foglio di Lavoro su una Singola Pagina PDF
Adatta le Colonne del Foglio di Lavoro su una Singola Pagina PDF
PdfSaveOptions.all_columns_in_one_page_per_sheet garantisce che tutte le colonne in un foglio di lavoro siano rese in un’unica pagina PDF, anche se le righe possono espandersi su più pagine a seconda dei dati presenti nel foglio di lavoro.
Il codice di esempio qui sotto mostra come utilizzare la proprietà PdfSaveOptions.all_columns_in_one_page_per_sheet per rendere un ampio foglio di lavoro con 100 colonne.
from aspose.cells import PdfSaveOptions, SaveFormat, Workbook | |
# For complete examples and data files, please go to https:# github.com/aspose-cells/Aspose.Cells-for-.NET | |
# The path to the documents directory. | |
dataDir = RunExamples.GetDataDir(".") | |
# Create and initialize an instance of Workbook | |
book = Workbook(dataDir + "TestBook.xlsx") | |
# Create and initialize an instance of PdfSaveOptions | |
saveOptions = PdfSaveOptions(SaveFormat.PDF) | |
# Set AllColumnsInOnePagePerSheet to true | |
saveOptions.all_columns_in_one_page_per_sheet = True | |
# Save Workbook to PDF fromart by passing the object of PdfSaveOptions | |
dataDir = dataDir + "output.out.pdf" | |
book.save(dataDir, saveOptions) |