Excel Dosyasını Yüksek Çözünürlüklü Görüntüye Dönüştür

Contents
[ ]

Yüksek çözünürlüklü ekranların yaygınlaşmasıyla, varsayılan 96 DPI ile oluşturulan görüntüler bulanık ve net olmayan görünebilir. Yüksek çözünürlükte güvenilir görüntü kalitesi için, daha yüksek DPI ayarlamak gerekir. Aspose.Cells for Python via .NET, ImageOrPrintOptions.horizontal_resolution ve ImageOrPrintOptions.vertical_resolution ayarlarını yapmanıza imkan tanır, böylece Excel dosyalarından yüksek kaliteli ve yüksek çözünürlüklü görüntüler oluşturabilirsiniz.

from aspose.cells import Workbook
from aspose.cells.drawing import ImageType
from aspose.cells.rendering import ImageOrPrintOptions, SheetRender
# For complete examples and data files, please go to https:# github.com/aspose-cells/Aspose.Cells-for-.NET
# Load the Excel file
workbook = Workbook("input.xlsx")
options = ImageOrPrintOptions()
options.horizontal_resolution = 300
options.vertical_resolution = 300
options.image_type = ImageType.PNG
# Create an instance of ImageOrPrintOptions
options = options
# Get the worksheet
sheet = workbook.worksheets[0]
# Create a SheetRender instance
render = SheetRender(sheet, options)
# Generate and save the image
render.to_image(0, "output.png")