I am trying to convert Excel documents to PDF, exactly “as is”: (Aspose version 22.2.0.0)
// Open the template excel file
Aspose.Cells.Workbook wb = new Aspose.Cells.Workbook(inputPath);
// create explicit SaveOptions
Aspose.Cells.PdfSaveOptions pdfSaveOptions = new Aspose.Cells.PdfSaveOptions();
pdfSaveOptions.OnePagePerSheet = true;
pdfSaveOptions.AllColumnsInOnePagePerSheet = true;
pdfSaveOptions.ExportDocumentStructure = true;
//pdfSaveOptions.GridlineType = GridlineType.Hair;
// Save the pdf file.
string outputFile = Path.GetFileNameWithoutExtension(inputPath) + "_out.pdf";
string outputPath = System.IO.Path.Combine(_outDir, outputFile);
wb.Save(outputPath, pdfSaveOptions);
return outputFile;
Now I notice that, in the output pdf, every cell has a border, even if it didn’t have one in the original Excel document! My Excel file has a hierarchical structure, so on the left side columns many cells are without border. Is there an option to preserve the exact borders of the original?