Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
131 changes: 93 additions & 38 deletions Document-Processing-toc.html
Original file line number Diff line number Diff line change
Expand Up @@ -5114,48 +5114,49 @@
</li>
</ul>
</li>
<li>Installation<ul>
<li>Web Installer
<ul>
<li>
<a href="/document-processing/excel/excel-library/net/installation/web-installer/how-to-download">How to Download?</a>
</li>
<li>
<a href="/document-processing/excel/excel-library/net/installation/web-installer/how-to-install">How to Install?</a>
</li>
</ul>
</li>
<li>Offline Installer
<ul>
<li>
<a href="/document-processing/excel/excel-library/net/installation/offline-installer/how-to-download">How to Download?</a>
</li>
<li>
<a href="/document-processing/excel/excel-library/net/installation/offline-installer/how-to-install">How to Install?</a>
</li>
</ul>
</li>
<li>Mac Installer
<li>Installation
<ul>
<li>
<a href="/document-processing/excel/excel-library/net/installation/mac-installer/how-to-download">How to Download?</a>
<li>Web Installer
<ul>
<li>
<a href="/document-processing/excel/excel-library/net/installation/web-installer/how-to-download">How to Download?</a>
</li>
<li>
<a href="/document-processing/excel/excel-library/net/installation/web-installer/how-to-install">How to Install?</a>
</li>
</ul>
</li>
<li>
<a href="/document-processing/excel/excel-library/net/installation/mac-installer/how-to-install">How to Install?</a>
<li>Offline Installer
<ul>
<li>
<a href="/document-processing/excel/excel-library/net/installation/offline-installer/how-to-download">How to Download?</a>
</li>
<li>
<a href="/document-processing/excel/excel-library/net/installation/offline-installer/how-to-install">How to Install?</a>
</li>
</ul>
</li>
</ul>
</li>
<li>Linux Installer
<ul>
<li>
<a href="/document-processing/excel/excel-library/net/installation/linux-installer/how-to-download">How to Download?</a>
<li>Mac Installer
<ul>
<li>
<a href="/document-processing/excel/excel-library/net/installation/mac-installer/how-to-download">How to Download?</a>
</li>
<li>
<a href="/document-processing/excel/excel-library/net/installation/mac-installer/how-to-install">How to Install?</a>
</li>
</ul>
</li>
<li>
<a href="/document-processing/excel/excel-library/net/installation/linux-installer/how-to-install">How to Install?</a>
<li>Linux Installer
<ul>
<li>
<a href="/document-processing/excel/excel-library/net/installation/linux-installer/how-to-download">How to Download?</a>
</li>
<li>
<a href="/document-processing/excel/excel-library/net/installation/linux-installer/how-to-install">How to Install?</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="/document-processing/excel/excel-library/net/document-object-model">Document Object Model</a>
Expand Down Expand Up @@ -5436,6 +5437,9 @@
<li>
<a href="/document-processing/excel/excel-library/net/Performance-Metrics">Performance Metrics</a>
</li>
<li>
<a href="/document-processing/excel/excel-library/net/Linux">Linux</a>
</li>
<li>
<a href="/document-processing/excel/excel-library/net/faq">FAQ</a>
<ul>
Expand Down Expand Up @@ -5793,6 +5797,57 @@
<li>
<a href="/document-processing/excel/excel-library/net/faqs/does-xlsio-support-converting-an-xlsb-file-to-xlsx">Does XlsIO support converting an XLSB file to XLSX?</a>
</li>
<li>
<a href="/document-processing/excel/excel-library/net/faqs/can-xlsio-determine-PDF-page-count-before-Excel-to-PDF-conversion">Can XlsIO determine PDF page count before Excel to PDF conversion?</a>
</li>
<li>
<a href="/document-processing/excel/excel-library/net/faqs/how-many-hyperlinks-can-a-single-cell-contain-in-Excel">How many hyperlinks can a single cell contain in Excel?</a>
</li>
<li>
<a href="/document-processing/excel/excel-library/net/faqs/how-to-apply-custom-filtering-to-string-data-types-using-XlsIO">How to apply custom filtering to string data types using XlsIO?</a>
</li>
<li>
<a href="/document-processing/excel/excel-library/net/faqs/how-to-get-RGB-values-of-a-cells-background-color">How to get RGB values of a cell's background color?</a>
</li>
<li>
<a href="/document-processing/excel/excel-library/net/faqs/does-xlsio-support-opacity-or-transparency-for-cell-background-colors-in-Excel">Does XlsIO support opacity or transparency for cell background colors in Excel?</a>
</li>
<li>
<a href="/document-processing/excel/excel-library/net/faqs/does-xlsio-support-internal-links-when-converting-Excel-to-PDF">Does XlsIO support internal links when converting Excel to PDF?</a>
</li>
<li>
<a href="/document-processing/excel/excel-library/net/faqs/what-ExcelKnownColors-are-available-in-syncfusion-xlsio">What ExcelKnownColors are available in Syncfusion XlsIO?</a>
</li>
<li>
<a href="/document-processing/excel/excel-library/net/faqs/does-xlsio-support-autofit-for-merged-cells">Does XlsIO support autofit for merged cells?</a>
</li>
<li>
<a href="/document-processing/excel/excel-library/net/faqs/does-xlsio-support-multiple-markers-in-a-single-Excel-cell">Does XlsIO support multiple markers in a single Excel cell?</a>
</li>
<li>
<a href="/document-processing/excel/excel-library/net/faqs/does-xlsio-support-setting-row-height-for-individual-cells-in-Excel">Does XlsIO support setting row height for individual cells in Excel?</a>
</li>
<li>
<a href="/document-processing/excel/excel-library/net/faqs/how-to-access-the-built-in-properties-of-Excel-documents">How to access the built-in properties of Excel documents?</a>
</li>
<li>
<a href="/document-processing/excel/excel-library/net/faqs/how-to-get-the-column-width-and-row-height-in-pixels">How to get the column width and row height in pixels?</a>
</li>
<li>
<a href="/document-processing/excel/excel-library/net/faqs/does-xlsio-support-sensititivity-labels">Does XlsIO support sensitivity labels?</a>
</li>
<li>
<a href="/document-processing/excel/excel-library/net/faqs/how-to-set-hex-color-value-to-the-cell">How to set a hex color value for a cell?</a>
</li>
<li>
<a href="/document-processing/excel/excel-library/net/faqs/in-which-situation-we-use-EnablePartialTrustCode-property">When should use EnablePartialTrustCode property?</a>
</li>
<li>
<a href="/document-processing/excel/excel-library/net/faqs/does-xlsio-support-reading-Excel-from-azure-blob-storage">Does XlsIO support reading Excel from Azure Blob Storage?</a>
</li>
<li>
<a href="/document-processing/excel/excel-library/net/faqs/does-xlsio-support-auto-correcting formulas">Does XlsIO support auto-correcting formulas?</a>
</li>
</ul>
</li>
</ul>
Expand Down Expand Up @@ -5824,7 +5879,7 @@
<a href="/document-processing/excel/conversions/excel-to-pdf/net/NuGet-Packages-Required-for-Excel-to-PDF">NuGet Packages Required</a>
</li>
<li>Getting Started
<ul>
<ul>
<li>
<a href="/document-processing/excel/conversions/excel-to-pdf/net/convert-excel-to-pdf-in-asp-net-core">ASP.NET Core</a>
</li>
Expand Down Expand Up @@ -5917,7 +5972,7 @@
<li>
<a href="/document-processing/excel/conversions/excel-to-pdf/net/faqs/is-it-possible-to-use-skiasharp-version-different-than-xlsiorenderer">Is it possible to use skiasharp version different than XlsIORenderer?</a>
</li>
<li>
<li>
<a href="/document-processing/excel/conversions/excel-to-pdf/net/faqs/does-xlsio-support-background-image-preserved-in-excel-to-pdf-conversion">Does XlsIO support background image in Excel to PDF conversion?</a>
</li>
</ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,36 @@ The following code snippet shows how to convert an Excel chart to an image using
{% highlight c# tabtitle="C# [Cross-platform]" playgroundButtonLink="https://raw.githubusercontent.com/SyncfusionExamples/XlsIO-Examples/master/Chart%20to%20Image/Chart%20to%20Image/.NET/Chart%20to%20Image/Chart%20to%20Image/Program.cs,180" %}
using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
//Initialize application
IApplication application = excelEngine.Excel;

//Set the default version as Xlsx
application.DefaultVersion = ExcelVersion.Xlsx;

// Initialize XlsIORenderer
application.XlsIORenderer = new XlsIORenderer();
//Initialize XlsIORenderer
application.XlsIORenderer = new XlsIORenderer();

//Set converter chart image format to PNG
application.XlsIORenderer.ChartRenderingOptions.ImageFormat = ExportImageFormat.Png;
//Set converter chart image format to PNG or JPEG
application.XlsIORenderer.ChartRenderingOptions.ImageFormat = ExportImageFormat.Png;

FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xlsx"), FileMode.Open, FileAccess.Read);
IWorkbook workbook = application.Workbooks.Open(inputStream);
IWorksheet worksheet = workbook.Worksheets[0];
//Set the chart image quality to best
application.XlsIORenderer.ChartRenderingOptions.ScalingMode = ScalingMode.Best;

IChart chart = worksheet.Charts[0];
//Open existing workbook with chart
IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));
IWorksheet worksheet = workbook.Worksheets[0];

//Access the chart from the worksheet
IChart chart = worksheet.Charts[0];

#region Save
//Saving the workbook
FileStream outputStream = new FileStream(Path.GetFullPath("Output/Image.png"), FileMode.Create, FileAccess.Write);
chart.SaveAsImage(outputStream);
#endregion
#region Save
//Exporting the chart as image
FileStream outputStream = new FileStream(Path.GetFullPath("Output/Image.png"), FileMode.Create, FileAccess.Write);
chart.SaveAsImage(outputStream);
#endregion

//Dispose streams
outputStream.Dispose();
inputStream.Dispose();
//Dispose streams
outputStream.Dispose();
}
{% endhighlight %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1024,4 +1024,118 @@ End Using
{% endhighlight %}
{% endtabs %}

A complete working example to add headers and footers in an Excel document using C# is present on [this GitHub page.](https://github.com/SyncfusionExamples/XlsIO-Examples/tree/master/Worksheet%20Features/Header%20and%20Footer/.NET/Header%20and%20Footer)
A complete working example to add headers and footers in an Excel document using C# is present on [this GitHub page.](https://github.com/SyncfusionExamples/XlsIO-Examples/tree/master/Worksheet%20Features/Header%20and%20Footer/.NET/Header%20and%20Footer)

## Paper Size

The <a href="https://help.syncfusion.com/cr/document-processing/Syncfusion.XlsIO.Interfaces.IPageSetupBase.html#Syncfusion_XlsIO_Interfaces_IPageSetupBase_PaperSize">PaperSize</a> functionality allows you to specify the paper size for worksheet.

The following code snippet shows how to use PaperSize.

{% tabs %}
{% highlight c# tabtitle="C# [Cross-platform]" playgroundButtonLink="https://raw.githubusercontent.com/SyncfusionExamples/XlsIO-Examples/master/Worksheet%20Features/PaperSize/.NET/PaperSize/PaperSize/Program.cs,180" %}
using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));
IWorksheet worksheet = workbook.Worksheets[0];

//Set the paper size to A4
worksheet.PageSetup.PaperSize = ExcelPaperSize.PaperA4;

//Saving the workbook
workbook.SaveAs(Path.GetFullPath("Output/Output.xlsx"));
}
{% endhighlight %}

{% highlight c# tabtitle="C# [Windows-specific]" %}
using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
IWorkbook workbook = application.Workbooks.Open("InputTemplate.xlsx");
IWorksheet worksheet = workbook.Worksheets[0];

//Set the paper size to A4
worksheet.PageSetup.PaperSize = ExcelPaperSize.PaperA4;

//Saving the workbook
workbook.SaveAs("Output.xlsx");
}
{% endhighlight %}

{% highlight vb.net tabtitle="VB.NET [Windows-specific]" %}
Using excelEngine As ExcelEngine = New ExcelEngine()
Dim application As IApplication = excelEngine.Excel
application.DefaultVersion = ExcelVersion.Xlsx
Dim workbook As IWorkbook = application.Workbooks.Open("InputTemplate.xlsx")
Dim worksheet As IWorksheet = workbook.Worksheets(0)

'Set the paper size to A4
worksheet.PageSetup.PaperSize = ExcelPaperSize.PaperA4

'Saving the workbook
workbook.SaveAs("Output.xlsx")
End Using
{% endhighlight %}
{% endtabs %}

A complete working example to set the paper size in C# is present on <a href="https://github.com/SyncfusionExamples/XlsIO-Examples/tree/master/Worksheet%20Features/PaperSize/.NET/PaperSize">this GitHub page</a>.

## Orientation

The <a href="https://help.syncfusion.com/cr/document-processing/Syncfusion.XlsIO.Interfaces.IPageSetupBase.html#Syncfusion_XlsIO_Interfaces_IPageSetupBase_Orientation">Orientation</a> functionality allows you to specify the orientation for worksheet.

The following code snippet shows how to use Orientation.

{% tabs %}
{% highlight c# tabtitle="C# [Cross-platform]" playgroundButtonLink="https://raw.githubusercontent.com/SyncfusionExamples/XlsIO-Examples/master/Worksheet%20Features/Orientation/.NET/Orientation/Orientation/Program.cs,180" %}
using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));
IWorksheet worksheet = workbook.Worksheets[0];

//Set the page orientation
worksheet.PageSetup.Orientation = ExcelPageOrientation.Landscape;

//Saving the workbook
workbook.SaveAs(Path.GetFullPath("Output/Output.xlsx"));
}
{% endhighlight %}

{% highlight c# tabtitle="C# [Windows-specific]" %}
using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
IWorkbook workbook = application.Workbooks.Open("InputTemplate.xlsx");
IWorksheet worksheet = workbook.Worksheets[0];

//Set the page orientation
worksheet.PageSetup.Orientation = ExcelPageOrientation.Landscape;

//Saving the workbook
workbook.SaveAs("Output.xlsx");
}
{% endhighlight %}

{% highlight vb.net tabtitle="VB.NET [Windows-specific]" %}
Using excelEngine As ExcelEngine = New ExcelEngine()
Dim application As IApplication = excelEngine.Excel
application.DefaultVersion = ExcelVersion.Xlsx
Dim workbook As IWorkbook = application.Workbooks.Open("InputTemplate.xlsx")
Dim worksheet As IWorksheet = workbook.Worksheets(0)

'Set the page orientation
worksheet.PageSetup.Orientation = ExcelPageOrientation.Landscape

'Saving the workbook
workbook.SaveAs("Output.xlsx")
End Using
{% endhighlight %}
{% endtabs %}

A complete working example to set the page orientation in C# is present on <a href="https://github.com/SyncfusionExamples/XlsIO-Examples/tree/master/Worksheet%20Features/Orientation/.NET/Orientation">this GitHub page</a>.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: XlsIO support for page count before PDF conversion | Syncfusion
description: This page explains whether Syncfusion XlsIO can determine the total number of pages of the PDF file before Excel to PDF conversion.
platform: document-processing
control: XlsIO
documentation: UG
---

# Can XlsIO determine PDF page count before Excel to PDF conversion?

No. XlsIO does not support determining the page count of the PDF document before Excel to PDF conversion. The final page count depends on factors such as print settings, page layout, scaling options, and content distribution. These elements can only be assessed during the conversion process, so calculating the page count in advance is not possible.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: Support for internal links when converting Excel to PDF | Syncfusion
description: This page explains whether Syncfusion XlsIO supports internal links when converting Excel to PDF using Syncfusion .NET Excel library (XlsIO).
platform: document-processing
control: XlsIO
documentation: UG
---

# Does XlsIO support internal links when converting Excel to PDF?

No. As per Microsoft Excel behavior, internal links within a worksheet are not retained when exported to PDF. Similarly, XlsIO does not support adding internal links in the converted PDF document.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
title: Transparency support for cell background color | Syncfusion
description: Learn whether Syncfusion XlsIO supports setting Opacity or transparency for cell background colors in Excel.
platform: document-processing
control: XlsIO
documentation: UG
---

# XlsIO support for cell background color transparency in Excel

XlsIO does not support opacity or transparency for cell background colors in Excel.

While the XlsIO API allows setting alpha (transparency) values for cell background colors, Microsoft Excel does not support rendering transparent cell fills. Excel silently discards the alpha component during rendering and file saving. As a result, any transparency value set in XlsIO will be ignored, and Excel will apply only the RGB portion of the color.

**For example:**
~~~
worksheet.Range["A1"].CellStyle.Color = Color.FromArgb(128, 255, 0, 0) //(50% transparent red)
worksheet.Range["A2"].CellStyle.Color = Color.FromArgb(255, 255, 0, 0) //(solid red)
~~~

Both render identically in Excel as solid red. While XlsIO accepts ARGB inputs, the alpha component has no effect due to Excel's inherent limitations. Only the RGB portion of the color is applied.
Loading