Mostrar línea de cuadrícula sólida al convertir Excel a PDF

Contents
[ ]

Para garantizar la compatibilidad con versiones anteriores, Aspose.Cells renderiza las líneas de cuadrícula como líneas punteadas de forma predeterminada al convertir Excel a PDF. Sin embargo, Excel moderno renderiza las líneas de cuadrícula como líneas sólidas en la actualidad.

Con la opción PdfSaveOptions.GridlineTypes, Aspose.Cells también puede renderizar las líneas de cuadrícula como líneas sólidas.

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
// Create an empty Workbook
Workbook wb = new Workbook();
//Prepare data
wb.Worksheets[0].Cells["D9"].PutValue("gridline");
//Enable to print gridline
wb.Worksheets[0].PageSetup.PrintGridlines = true;
//Set to render gridline as solid line
PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
pdfSaveOptions.GridlineType = GridlineType.Hair;
// Save the pdf file with PdfSaveOptions
wb.Save(TMP_DIR + "test_Cs.pdf", pdfSaveOptions);

solid-gridline.png