-
diff --git a/Document-Processing/Excel/Conversions/Chart-to-Image/NET/Chart-to-Image-Conversion.md b/Document-Processing/Excel/Conversions/Chart-to-Image/NET/Chart-to-Image-Conversion.md
index 7e188b160..3a7e086e3 100644
--- a/Document-Processing/Excel/Conversions/Chart-to-Image/NET/Chart-to-Image-Conversion.md
+++ b/Document-Processing/Excel/Conversions/Chart-to-Image/NET/Chart-to-Image-Conversion.md
@@ -19,36 +19,30 @@ 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())
{
- //Initialize application
- IApplication application = excelEngine.Excel;
-
- //Set the default version as Xlsx
- application.DefaultVersion = ExcelVersion.Xlsx;
+ IApplication application = excelEngine.Excel;
+ application.DefaultVersion = ExcelVersion.Xlsx;
- //Initialize XlsIORenderer
- application.XlsIORenderer = new XlsIORenderer();
+ // Initialize XlsIORenderer
+ application.XlsIORenderer = new XlsIORenderer();
- //Set converter chart image format to PNG or JPEG
- application.XlsIORenderer.ChartRenderingOptions.ImageFormat = ExportImageFormat.Png;
+ //Set converter chart image format to PNG
+ application.XlsIORenderer.ChartRenderingOptions.ImageFormat = ExportImageFormat.Png;
- //Set the chart image quality to best
- application.XlsIORenderer.ChartRenderingOptions.ScalingMode = ScalingMode.Best;
+ FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xlsx"), FileMode.Open, FileAccess.Read);
+ IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorksheet worksheet = workbook.Worksheets[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];
+ IChart chart = worksheet.Charts[0];
- #region Save
- //Exporting the chart as image
- FileStream outputStream = new FileStream(Path.GetFullPath("Output/Image.png"), FileMode.Create, FileAccess.Write);
- chart.SaveAsImage(outputStream);
- #endregion
+ #region Save
+ //Saving the workbook
+ FileStream outputStream = new FileStream(Path.GetFullPath("Output/Image.png"), FileMode.Create, FileAccess.Write);
+ chart.SaveAsImage(outputStream);
+ #endregion
- //Dispose streams
- outputStream.Dispose();
+ //Dispose streams
+ outputStream.Dispose();
+ inputStream.Dispose();
}
{% endhighlight %}
diff --git a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/Excel-to-PDF-Conversion.md b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/Excel-to-PDF-Conversion.md
index 869b8edea..e5be51930 100644
--- a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/Excel-to-PDF-Conversion.md
+++ b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/Excel-to-PDF-Conversion.md
@@ -25,8 +25,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xlsx"), FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));
//Initialize XlsIO renderer.
XlsIORenderer renderer = new XlsIORenderer();
@@ -36,13 +35,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
#region Save
//Saving the workbook
- FileStream outputStream = new FileStream(Path.GetFullPath("Output/WorkbookToPDF.pdf"), FileMode.Create, FileAccess.Write);
- pdfDocument.Save(outputStream);
+ pdfDocument.Save(Path.GetFullPath("Output/WorkbookToPDF.pdf"));
#endregion
-
- //Dispose streams
- outputStream.Dispose();
- inputStream.Dispose();
}
{% endhighlight %}
@@ -102,8 +96,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xlsx"), FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));
IWorksheet worksheet = workbook.Worksheets[0];
//Initialize XlsIO renderer.
@@ -114,13 +107,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
#region Save
//Saving the workbook
- FileStream outputStream = new FileStream(Path.GetFullPath("Output/WorksheetToPDF.pdf"), FileMode.Create, FileAccess.Write);
- pdfDocument.Save(outputStream);
+ pdfDocument.Save(Path.GetFullPath("Output/WorksheetToPDF.pdf"));
#endregion
-
- //Dispose streams
- outputStream.Dispose();
- inputStream.Dispose();
}
{% endhighlight %}
@@ -174,8 +162,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xlsx"), FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));
//Initialize XlsIO renderer.
XlsIORenderer renderer = new XlsIORenderer();
@@ -187,20 +174,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
#region Save
//Saving the workbook
- FileStream outputStream = new FileStream(sheet.Name +".pdf", FileMode.Create, FileAccess.Write);
- pdfDocument.Save(outputStream);
+ pdfDocument.Save(sheet.Name + ".pdf");
#endregion
-
- //Dispose streams
- outputStream.Dispose();
- inputStream.Dispose();
-
- System.Diagnostics.Process process = new System.Diagnostics.Process();
- process.StartInfo = new System.Diagnostics.ProcessStartInfo(sheet.Name + ".pdf")
- {
- UseShellExecute = true
- };
- process.Start();
}
}
{% endhighlight %}
@@ -262,8 +237,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xlsx"), FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));
IWorksheet worksheet = workbook.Worksheets[0];
IChart chart = worksheet.Charts[0];
@@ -276,13 +250,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
#region Save
//Saving the workbook
- FileStream outputStream = new FileStream(Path.GetFullPath("Output/ChartToPDF.pdf"), FileMode.Create, FileAccess.Write);
- pdfDocument.Save(outputStream);
+ pdfDocument.Save(Path.GetFullPath("Output/ChartToPDF.pdf"));
#endregion
-
- //Dispose streams
- outputStream.Dispose();
- inputStream.Dispose();
}
{% endhighlight %}
@@ -347,8 +316,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xlsx"), FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));
IWorksheet worksheet = workbook.Worksheets[0];
//Set print location to comments
@@ -362,13 +330,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
#region Save
//Saving the workbook
- FileStream outputStream = new FileStream(Path.GetFullPath("Output/CommentsInPlaceToPDF.pdf"), FileMode.Create, FileAccess.Write);
- pdfDocument.Save(outputStream);
+ pdfDocument.Save(Path.GetFullPath("Output/CommentsInPlaceToPDF.pdf"));
#endregion
-
- //Dispose streams
- outputStream.Dispose();
- inputStream.Dispose();
}
{% endhighlight %}
@@ -440,8 +403,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xlsx"), FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));
IWorksheet worksheet = workbook.Worksheets[0];
//Set print location to comments
@@ -455,13 +417,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
#region Save
//Saving the workbook
- FileStream outputStream = new FileStream(Path.GetFullPath("Output/CommentsToPDFAtEnd.pdf"), FileMode.Create, FileAccess.Write);
- pdfDocument.Save(outputStream);
+ pdfDocument.Save(Path.GetFullPath("Output/CommentsToPDFAtEnd.pdf"));
#endregion
-
- //Dispose streams
- outputStream.Dispose();
- inputStream.Dispose();
}
{% endhighlight %}
@@ -534,8 +491,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xlsx"), FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));
IWorksheet worksheet = workbook.Worksheets[0];
//Set print location to comments
@@ -549,13 +505,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
#region Save
//Saving the workbook
- FileStream outputStream = new FileStream(Path.GetFullPath("Output/NoCommentsInPDF.pdf"), FileMode.Create, FileAccess.Write);
- pdfDocument.Save(outputStream);
+ pdfDocument.Save(Path.GetFullPath("Output/NoCommentsInPDF.pdf"));
#endregion
-
- //Dispose streams
- outputStream.Dispose();
- inputStream.Dispose();
}
{% endhighlight %}
@@ -632,8 +583,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream("CommentsTemplate.xlsx", FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open("CommentsTemplate.xlsx");
IWorksheet worksheet = workbook.Worksheets[0];
//Add threaded comment
@@ -651,9 +601,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
//Convert Excel document into PDF document
PdfDocument pdfDocument = renderer.ConvertToPDF(worksheet);
- Stream stream = new FileStream("ExcelComments.pdf", FileMode.Create, FileAccess.ReadWrite);
- pdfDocument.Save(stream);
- stream.Dispose();
+ pdfDocument.Save("ExcelComments.pdf");
}
{% endhighlight %}
@@ -761,17 +709,12 @@ namespace FontSubstitution
//Initialize XlsIO renderer.
XlsIORenderer renderer = new XlsIORenderer();
- FileStream excelStream = new FileStream("Template.xlsx", FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(excelStream);
+ IWorkbook workbook = application.Workbooks.Open("Template.xlsx");
//Convert Excel document with charts into PDF document
PdfDocument pdfDocument = renderer.ConvertToPDF(workbook);
- Stream stream = new FileStream("ExcelToPDF.pdf", FileMode.Create, FileAccess.ReadWrite);
- pdfDocument.Save(stream);
-
- excelStream.Dispose();
- stream.Dispose();
+ pdfDocument.Save("ExcelToPDF.pdf");
}
}
@@ -1207,8 +1150,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream fileStream = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xlsx"), FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(fileStream);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));
//Initialize XlsIORenderer
application.XlsIORenderer = new XlsIORenderer();
@@ -1222,13 +1164,11 @@ using (ExcelEngine excelEngine = new ExcelEngine())
//Convert Excel document into PDF document
PdfDocument pdfDocument = renderer.ConvertToPDF(workbook);
- //Save the converted PDF document to stream.
- FileStream stream = new FileStream("Sample.pdf", FileMode.Create, FileAccess.ReadWrite);
- pdfDocument.Save(stream);
+ //Save the converted PDF document
+ pdfDocument.Save("Sample.pdf");
//Close and Dispose
workbook.Close();
- stream.Dispose();
}
{% endhighlight %}
@@ -1288,8 +1228,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream fileStream = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xlsx"), FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(fileStream);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));
//Initialize XlsIORenderer
application.XlsIORenderer = new XlsIORenderer();
@@ -1312,13 +1251,11 @@ using (ExcelEngine excelEngine = new ExcelEngine())
//Convert Excel document into PDF document
PdfDocument pdfDocument = renderer.ConvertToPDF(workbook);
- //Save the converted PDF document to stream.
- FileStream stream = new FileStream("Sample.pdf", FileMode.Create, FileAccess.ReadWrite);
- pdfDocument.Save(stream);
+ //Save the converted PDF document
+ pdfDocument.Save("Sample.pdf");
//Close and Dispose
workbook.Close();
- stream.Dispose();
}
{% endhighlight %}
@@ -1398,8 +1335,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream fileStream = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xlsx"), FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(fileStream);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));
//Initialize XlsIORenderer
application.XlsIORenderer = new XlsIORenderer();
@@ -1423,12 +1359,10 @@ using (ExcelEngine excelEngine = new ExcelEngine())
PdfDocument pdfDocument = renderer.ConvertToPDF(workbook);
//Excel to PDF
- Stream stream = new FileStream("Sample.pdf", FileMode.Create, FileAccess.ReadWrite);
- pdfDocument.Save(stream);
+ pdfDocument.Save("Sample.pdf");
//Close and Dispose
workbook.Close();
- stream.Dispose();
}
{% endhighlight %}
@@ -1506,8 +1440,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream fileStream = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xlsx"), FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(fileStream);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));
//Initialize XlsIORenderer
application.XlsIORenderer = new XlsIORenderer();
@@ -1529,13 +1462,11 @@ using (ExcelEngine excelEngine = new ExcelEngine())
//Convert Excel document into PDF document
PdfDocument pdfDocument = renderer.ConvertToPDF(workbook);
- //Save the PDF document to stream
- FileStream stream = new FileStream("Sample.pdf", FileMode.Create, FileAccess.ReadWrite);
- pdfDocument.Save(stream);
+ //Save the PDF document
+ pdfDocument.Save("Sample.pdf");
//Close and Dispose
workbook.Close();
- stream.Dispose();
}
{% endhighlight %}
diff --git a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/Excel-to-PDF-Converter-Settings.md b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/Excel-to-PDF-Converter-Settings.md
index a2f43ed04..c7a914728 100644
--- a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/Excel-to-PDF-Converter-Settings.md
+++ b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/Excel-to-PDF-Converter-Settings.md
@@ -22,8 +22,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xlsx"), FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));
//Initialize XlsIORendererSettings
XlsIORendererSettings settings = new XlsIORendererSettings();
@@ -39,13 +38,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
#region Save
//Saving the workbook
- FileStream outputStream = new FileStream(Path.GetFullPath("Output/ComplexScriptToPDF.pdf"), FileMode.Create, FileAccess.Write);
- pdfDocument.Save(outputStream);
+ pdfDocument.Save(Path.GetFullPath("Output/ComplexScriptToPDF.pdf"));
#endregion
-
- //Dispose streams
- outputStream.Dispose();
- inputStream.Dispose();
}
{% endhighlight %}
@@ -111,8 +105,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xlsx"), FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));
//Initialize XlsIORendererSettings
XlsIORendererSettings settings = new XlsIORendererSettings();
@@ -128,13 +121,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
#region Save
//Saving the workbook
- FileStream outputStream = new FileStream(Path.GetFullPath("Output/CustomPaperSize.pdf"), FileMode.Create, FileAccess.Write);
- pdfDocument.Save(outputStream);
+ pdfDocument.Save(Path.GetFullPath("Output/CustomPaperSize.pdf"));
#endregion
-
- //Dispose streams
- outputStream.Dispose();
- inputStream.Dispose();
}
{% endhighlight %}
@@ -201,8 +189,7 @@ Gridlines will not be rendered in the output PDF document, when display style is
using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
- FileStream excelStream = new FileStream("Sample.xlsx", FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(excelStream);
+ IWorkbook workbook = application.Workbooks.Open("Sample.xlsx");
//Initialize XlsIORendererSettings
XlsIORendererSettings settings = new XlsIORendererSettings();
@@ -216,17 +203,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
//Convert the Excel document to PDF with renderer settings
PdfDocument document = renderer.ConvertToPDF(workbook, settings);
- //Saving the Excel to the MemoryStream
- MemoryStream stream = new MemoryStream();
- document.Save(stream);
-
- //Set the position as '0'
- stream.Position = 0;
-
- //Download the PDF file in the browser
- FileStreamResult fileStreamResult = new FileStreamResult(stream, "application/pdf");
- fileStreamResult.FileDownloadName = "Output.pdf";
- return fileStreamResult;
+ //Save the PDF document
+ document.Save("Output.pdf");
}
{% endhighlight %}
@@ -287,8 +265,7 @@ Gridlines will not be rendered in the output PDF document, when display style is
using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
- FileStream excelStream = new FileStream("Sample.xlsx", FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(excelStream);
+ IWorkbook workbook = application.Workbooks.Open("Sample.xlsx");
//Initialize XlsIORendererSettings
XlsIORendererSettings settings = new XlsIORendererSettings();
@@ -302,17 +279,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
//Convert the Excel document to PDF with renderer settings
PdfDocument document = renderer.ConvertToPDF(workbook, settings);
- //Saving the Excel to the MemoryStream
- MemoryStream stream = new MemoryStream();
- document.Save(stream);
-
- //Set the position as '0'
- stream.Position = 0;
-
- //Download the PDF file in the browser
- FileStreamResult fileStreamResult = new FileStreamResult(stream, "application/pdf");
- fileStreamResult.FileDownloadName = "Output.pdf";
- return fileStreamResult;
+ //Save the PDF document
+ document.Save("Output.pdf");
}
{% endhighlight %}
@@ -374,8 +342,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xlsx"), FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));
//Initialize XlsIORendererSettings
XlsIORendererSettings settings = new XlsIORendererSettings();
@@ -391,13 +358,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
#region Save
//Saving the workbook
- FileStream outputStream = new FileStream(Path.GetFullPath("Output/Gridlines.pdf"), FileMode.Create, FileAccess.Write);
- pdfDocument.Save(outputStream);
+ pdfDocument.Save(Path.GetFullPath("Output/Gridlines.pdf"));
#endregion
-
- //Dispose streams
- outputStream.Dispose();
- inputStream.Dispose();
}
{% endhighlight %}
@@ -463,8 +425,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xlsx"), FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));
//Initialize XlsIORendererSettings
XlsIORendererSettings settings = new XlsIORendererSettings();
@@ -480,13 +441,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
#region Save
//Saving the workbook
- FileStream outputStream = new FileStream(Path.GetFullPath("Output/EmbedFonts.pdf"), FileMode.Create, FileAccess.Write);
- pdfDocument.Save(outputStream);
+ pdfDocument.Save(Path.GetFullPath("Output/EmbedFonts.pdf"));
#endregion
-
- //Dispose streams
- outputStream.Dispose();
- inputStream.Dispose();
}
{% endhighlight %}
@@ -552,8 +508,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xlsx"), FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));
//Initialize XlsIORendererSettings
XlsIORendererSettings settings = new XlsIORendererSettings();
@@ -569,13 +524,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
#region Save
//Saving the workbook
- FileStream outputStream = new FileStream(Path.GetFullPath("Output/BookmarksInPDF.pdf"), FileMode.Create, FileAccess.Write);
- pdfDocument.Save(outputStream);
+ pdfDocument.Save(Path.GetFullPath("Output/BookmarksInPDF.pdf"));
#endregion
-
- //Dispose streams
- outputStream.Dispose();
- inputStream.Dispose();
}
{% endhighlight %}
@@ -641,8 +591,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xlsx"), FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));
//Initialize XlsIORendererSettings
XlsIORendererSettings settings = new XlsIORendererSettings();
@@ -658,13 +607,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
#region Save
//Saving the workbook
- FileStream outputStream = new FileStream(Path.GetFullPath("Output/DocumentProperties.pdf"), FileMode.Create, FileAccess.Write);
- pdfDocument.Save(outputStream);
+ pdfDocument.Save(Path.GetFullPath("Output/DocumentProperties.pdf"));
#endregion
-
- //Dispose streams
- outputStream.Dispose();
- inputStream.Dispose();
}
{% endhighlight %}
@@ -730,8 +674,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xlsx"), FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));
//Initialize XlsIORendererSettings
XlsIORendererSettings settings = new XlsIORendererSettings();
@@ -747,13 +690,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
#region Save
//Saving the workbook
- FileStream outputStream = new FileStream(Path.GetFullPath("Output/QualityImageInPDF.pdf"), FileMode.Create, FileAccess.Write);
- pdfDocument.Save(outputStream);
+ pdfDocument.Save(Path.GetFullPath("Output/QualityImageInPDF.pdf"));
#endregion
-
- //Dispose streams
- outputStream.Dispose();
- inputStream.Dispose();
}
{% endhighlight %}
@@ -820,8 +758,7 @@ Document header will be rendered to PDF document by default. This can be skipped
using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
- FileStream excelStream = new FileStream("Sample.xlsx", FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(excelStream);
+ IWorkbook workbook = application.Workbooks.Open("Sample.xlsx");
//Initialize XlsIORendererSettings
XlsIORendererSettings settings = new XlsIORendererSettings();
@@ -835,17 +772,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
//Convert the Excel document to PDF with renderer settings
PdfDocument document = renderer.ConvertToPDF(workbook, settings);
- //Saving the Excel to the MemoryStream
- MemoryStream stream = new MemoryStream();
- document.Save(stream);
-
- //Set the position as '0'
- stream.Position = 0;
-
- //Download the PDF file in the browser
- FileStreamResult fileStreamResult = new FileStreamResult(stream, "application/pdf");
- fileStreamResult.FileDownloadName = "Output.pdf";
- return fileStreamResult;
+ //Save the PDF document
+ document.Save("Output.pdf");
}
{% endhighlight %}
@@ -907,8 +835,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xlsx"), FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));
//Initialize XlsIORendererSettings
XlsIORendererSettings settings = new XlsIORendererSettings();
@@ -927,13 +854,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
#region Save
//Saving the workbook
- FileStream outputStream = new FileStream(Path.GetFullPath("Output/HeaderFooterInPDF.pdf"), FileMode.Create, FileAccess.Write);
- pdfDocument.Save(outputStream);
+ pdfDocument.Save(Path.GetFullPath("Output/HeaderFooterInPDF.pdf"));
#endregion
-
- //Dispose streams
- outputStream.Dispose();
- inputStream.Dispose();
}
{% endhighlight %}
@@ -999,8 +921,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xlsx"), FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));
//Initialize XlsIORendererSettings
XlsIORendererSettings settings = new XlsIORendererSettings();
@@ -1016,13 +937,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
#region Save
//Saving the workbook
- FileStream outputStream = new FileStream(Path.GetFullPath("Output/BlankPageToPDF.pdf"), FileMode.Create, FileAccess.Write);
- pdfDocument.Save(outputStream);
+ pdfDocument.Save(Path.GetFullPath("Output/BlankPageToPDF.pdf"));
#endregion
-
- //Dispose streams
- outputStream.Dispose();
- inputStream.Dispose();
}
{% endhighlight %}
@@ -1088,8 +1004,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xlsx"), FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));
//Initialize XlsIORendererSettings
XlsIORendererSettings settings = new XlsIORendererSettings();
@@ -1105,13 +1020,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
#region Save
//Saving the workbook
- FileStream outputStream = new FileStream(Path.GetFullPath("Output/BlankSheetToPDF.pdf"), FileMode.Create, FileAccess.Write);
- pdfDocument.Save(outputStream);
+ pdfDocument.Save(Path.GetFullPath("Output/BlankSheetToPDF.pdf"));
#endregion
-
- //Dispose streams
- outputStream.Dispose();
- inputStream.Dispose();
}
{% endhighlight %}
@@ -1179,8 +1089,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xlsx"), FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));
//Initialize XlsIORendererSettings
XlsIORendererSettings settings = new XlsIORendererSettings();
@@ -1196,13 +1105,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
#region Save
//Saving the workbook
- FileStream outputStream = new FileStream(Path.GetFullPath("Output/Automatic.pdf"), FileMode.Create, FileAccess.Write);
- pdfDocument.Save(outputStream);
+ pdfDocument.Save(Path.GetFullPath("Output/Automatic.pdf"));
#endregion
-
- //Dispose streams
- outputStream.Dispose();
- inputStream.Dispose();
}
{% endhighlight %}
@@ -1266,8 +1170,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xlsx"), FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));
//Initialize XlsIORendererSettings
XlsIORendererSettings settings = new XlsIORendererSettings();
@@ -1283,13 +1186,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
#region Save
//Saving the workbook
- FileStream outputStream = new FileStream(Path.GetFullPath("Output/CustomScaling.pdf"), FileMode.Create, FileAccess.Write);
- pdfDocument.Save(outputStream);
+ pdfDocument.Save(Path.GetFullPath("Output/CustomScaling.pdf"));
#endregion
-
- //Dispose streams
- outputStream.Dispose();
- inputStream.Dispose();
}
{% endhighlight %}
@@ -1353,8 +1251,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xlsx"), FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));
//Initialize XlsIORendererSettings
XlsIORendererSettings settings = new XlsIORendererSettings();
@@ -1370,13 +1267,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
#region Save
//Saving the workbook
- FileStream outputStream = new FileStream(Path.GetFullPath("Output/FitAllColumnsOnOnePage.pdf"), FileMode.Create, FileAccess.Write);
- pdfDocument.Save(outputStream);
+ pdfDocument.Save(Path.GetFullPath("Output/FitAllColumnsOnOnePage.pdf"));
#endregion
-
- //Dispose streams
- outputStream.Dispose();
- inputStream.Dispose();
}
{% endhighlight %}
@@ -1440,8 +1332,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xlsx"), FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));
//Initialize XlsIORendererSettings
XlsIORendererSettings settings = new XlsIORendererSettings();
@@ -1457,13 +1348,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
#region Save
//Saving the workbook
- FileStream outputStream = new FileStream(Path.GetFullPath("Output/FitAllRowsOnOnePage.pdf"), FileMode.Create, FileAccess.Write);
- pdfDocument.Save(outputStream);
+ pdfDocument.Save(Path.GetFullPath("Output/FitAllRowsOnOnePage.pdf"));
#endregion
-
- //Dispose streams
- outputStream.Dispose();
- inputStream.Dispose();
}
{% endhighlight %}
@@ -1527,8 +1413,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xlsx"), FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));
//Initialize XlsIORendererSettings
XlsIORendererSettings settings = new XlsIORendererSettings();
@@ -1544,13 +1429,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
#region Save
//Saving the workbook
- FileStream outputStream = new FileStream(Path.GetFullPath("Output/FitSheetOnOnePage.pdf"), FileMode.Create, FileAccess.Write);
- pdfDocument.Save(outputStream);
+ pdfDocument.Save(Path.GetFullPath("Output/FitSheetOnOnePage.pdf"));
#endregion
-
- //Dispose streams
- outputStream.Dispose();
- inputStream.Dispose();
}
{% endhighlight %}
@@ -1614,8 +1494,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xlsx"), FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));
//Initialize XlsIORendererSettings
XlsIORendererSettings settings = new XlsIORendererSettings();
@@ -1631,13 +1510,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
#region Save
//Saving the workbook
- FileStream outputStream = new FileStream(Path.GetFullPath("Output/NoScaling.pdf"), FileMode.Create, FileAccess.Write);
- pdfDocument.Save(outputStream);
+ pdfDocument.Save(Path.GetFullPath("Output/NoScaling.pdf"));
#endregion
-
- //Dispose streams
- outputStream.Dispose();
- inputStream.Dispose();
}
{% endhighlight %}
@@ -1708,8 +1582,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xlsx"), FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));
//Initialize XlsIO renderer.
XlsIORenderer renderer = new XlsIORenderer();
@@ -1725,13 +1598,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
#region Save
//Saving the workbook
- FileStream outputStream = new FileStream(Path.GetFullPath("Output/PDFConformance.pdf"), FileMode.Create, FileAccess.Write);
- pdfDocument.Save(outputStream);
+ pdfDocument.Save(Path.GetFullPath("Output/PDFConformance.pdf"));
#endregion
-
- //Dispose streams
- outputStream.Dispose();
- inputStream.Dispose();
}
{% endhighlight %}
@@ -1799,11 +1667,9 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream1 = new FileStream(Path.GetFullPath(@"Data/Template1.xlsx"), FileMode.Open, FileAccess.Read);
- IWorkbook workbook1 = application.Workbooks.Open(inputStream1);
+ IWorkbook workbook1 = application.Workbooks.Open(Path.GetFullPath(@"Data/Template1.xlsx"));
- FileStream inputStream2 = new FileStream(Path.GetFullPath(@"Data/Template2.xlsx"), FileMode.Open, FileAccess.Read);
- IWorkbook workbook2 = application.Workbooks.Open(inputStream2);
+ IWorkbook workbook2 = application.Workbooks.Open(Path.GetFullPath(@"Data/Template2.xlsx"));
//Initialize XlsIORenderer
XlsIORenderer renderer = new XlsIORenderer();
@@ -1822,14 +1688,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
#region Save
//Saving the workbook
- FileStream outputStream = new FileStream(Path.GetFullPath("Output/MultipleExcelToPDF.pdf"), FileMode.Create, FileAccess.Write);
- newDocument.Save(outputStream);
+ newDocument.Save(Path.GetFullPath("Output/MultipleExcelToPDF.pdf"));
#endregion
-
- //Dispose streams
- outputStream.Dispose();
- inputStream1.Dispose();
- inputStream2.Dispose();
}
{% endhighlight %}
@@ -1907,8 +1767,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
application.DefaultVersion = ExcelVersion.Xlsx;
//Open an Excel document
- FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xlsx"), FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));
//Get the first worksheet
IWorksheet worksheet1 = workbook.Worksheets[0];
@@ -1933,13 +1792,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
#region Save
//Saving the workbook
- FileStream outputStream = new FileStream(Path.GetFullPath("Output/SelectedSheetsToPDF.pdf"), FileMode.Create, FileAccess.Write);
- newDocument.Save(outputStream);
+ newDocument.Save(Path.GetFullPath("Output/SelectedSheetsToPDF.pdf"));
#endregion
-
- //Dispose streams
- outputStream.Dispose();
- inputStream.Dispose();
}
{% endhighlight %}
@@ -2039,8 +1893,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream("../../../Data/InputTemplate.xlsx",FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));
//Initialize XlsIORendererSettings
XlsIORendererSettings settings = new XlsIORendererSettings();
@@ -2055,8 +1908,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
PdfDocument pdfDocument = renderer.ConvertToPDF(workbook, settings);
//Save the PDF document
- FileStream outputStream = new FileStream("Output.pdf",FileMode.Create, FileAccess.Write);
- pdfDocument.Save(outputStream);
+ pdfDocument.Save("Output.pdf");
}
{% endhighlight %}
@@ -2137,12 +1989,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
#region Save
//Saving the workbook
- FileStream outputStream = new FileStream(Path.GetFullPath("Output/EmptyExcelToPDF.pdf"), FileMode.Create, FileAccess.Write);
- pdfDocument.Save(outputStream);
+ pdfDocument.Save(Path.GetFullPath("Output/EmptyExcelToPDF.pdf"));
#endregion
-
- //Dispose streams
- outputStream.Dispose();
}
{% endhighlight %}
@@ -2227,8 +2075,7 @@ namespace Warnings
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
//Open the Excel document to convert.
- FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xlsx"), FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));
//Initialize warning class to capture warnings during the conversion.
Warning warning = new Warning();
@@ -2250,14 +2097,9 @@ namespace Warnings
{
#region Save
//Saving the workbook
- FileStream outputStream = new FileStream(Path.GetFullPath("Output/ExceltoPDF.pdf"), FileMode.Create, FileAccess.Write);
- pdfDocument.Save(outputStream);
+ pdfDocument.Save(Path.GetFullPath("Output/ExceltoPDF.pdf"));
#endregion
-
- //Dispose streams
- outputStream.Dispose();
}
- inputStream.Dispose();
}
}
}
@@ -2392,5 +2234,4 @@ End Namespace
{% endhighlight %}
{% endtabs %}
-A complete working example to skip warning in Excel to PDF in C# is present on [this GitHub page](https://github.com/SyncfusionExamples/XlsIO-Examples/tree/master/Excel%20to%20PDF/Warnings/.NET/Warnings).
-
+A complete working example to skip warning in Excel to PDF in C# is present on [this GitHub page](https://github.com/SyncfusionExamples/XlsIO-Examples/tree/master/Excel%20to%20PDF/Warnings/.NET/Warnings).
\ No newline at end of file
diff --git a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/UWP_images/UWP_images_img4.png b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/UWP_images/UWP_images_img4.png
index b4ee8df32..cd6c0e447 100644
Binary files a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/UWP_images/UWP_images_img4.png and b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/UWP_images/UWP_images_img4.png differ
diff --git a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/UWP_images/UWP_images_img5.png b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/UWP_images/UWP_images_img5.png
index 9811f3682..264f1e869 100644
Binary files a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/UWP_images/UWP_images_img5.png and b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/UWP_images/UWP_images_img5.png differ
diff --git a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/UWP_images/UWP_images_img6.png b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/UWP_images/UWP_images_img6.png
index 4a698ee2f..20acf632c 100644
Binary files a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/UWP_images/UWP_images_img6.png and b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/UWP_images/UWP_images_img6.png differ
diff --git a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/UWP_images/UWP_images_img7.png b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/UWP_images/UWP_images_img7.png
index 0fcc2bd8e..67ab816b6 100644
Binary files a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/UWP_images/UWP_images_img7.png and b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/UWP_images/UWP_images_img7.png differ
diff --git a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/Windows-Forms_images/Windows-Forms_images_img5.png b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/Windows-Forms_images/Windows-Forms_images_img5.png
index bef4c758b..766c74072 100644
Binary files a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/Windows-Forms_images/Windows-Forms_images_img5.png and b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/Windows-Forms_images/Windows-Forms_images_img5.png differ
diff --git a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/Windows-Forms_images/Windows-Forms_images_img6.png b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/Windows-Forms_images/Windows-Forms_images_img6.png
index 68ee736fb..ca929eb53 100644
Binary files a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/Windows-Forms_images/Windows-Forms_images_img6.png and b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/Windows-Forms_images/Windows-Forms_images_img6.png differ
diff --git a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/Windows-Forms_images/Windows-Forms_images_img7.png b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/Windows-Forms_images/Windows-Forms_images_img7.png
index 0fcc2bd8e..67ab816b6 100644
Binary files a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/Windows-Forms_images/Windows-Forms_images_img7.png and b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/Windows-Forms_images/Windows-Forms_images_img7.png differ
diff --git a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/Wpf_images/Wpf_images_img4.png b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/Wpf_images/Wpf_images_img4.png
index 7a7902f1d..f9a468e12 100644
Binary files a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/Wpf_images/Wpf_images_img4.png and b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/Wpf_images/Wpf_images_img4.png differ
diff --git a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/Wpf_images/Wpf_images_img5.png b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/Wpf_images/Wpf_images_img5.png
index d6dd8fecc..878796e40 100644
Binary files a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/Wpf_images/Wpf_images_img5.png and b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/Wpf_images/Wpf_images_img5.png differ
diff --git a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/Wpf_images/Wpf_images_img6.png b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/Wpf_images/Wpf_images_img6.png
index 7fb54a8fb..e83bb005b 100644
Binary files a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/Wpf_images/Wpf_images_img6.png and b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/Wpf_images/Wpf_images_img6.png differ
diff --git a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/Wpf_images/Wpf_images_img7.png b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/Wpf_images/Wpf_images_img7.png
index 0fcc2bd8e..67ab816b6 100644
Binary files a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/Wpf_images/Wpf_images_img7.png and b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/Wpf_images/Wpf_images_img7.png differ
diff --git a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-asp-net-core.md b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-asp-net-core.md
index 882e8b13c..099c57351 100644
--- a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-asp-net-core.md
+++ b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-asp-net-core.md
@@ -66,8 +66,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream excelStream = new FileStream("Sample.xlsx", FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(excelStream);
+ IWorkbook workbook = application.Workbooks.Open("Sample.xlsx");
//Initialize XlsIO renderer.
XlsIORenderer renderer = new XlsIORenderer();
@@ -146,8 +145,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream excelStream = new FileStream("Sample.xlsx", FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(excelStream);
+ IWorkbook workbook = application.Workbooks.Open("Sample.xlsx");
//Initialize XlsIO renderer.
XlsIORenderer renderer = new XlsIORenderer();
diff --git a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-asp-net-mvc.md b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-asp-net-mvc.md
index b9bff300a..c017f2f52 100644
--- a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-asp-net-mvc.md
+++ b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-asp-net-mvc.md
@@ -60,8 +60,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream excelStream = new FileStream("Sample.xlsx", FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(excelStream);
+ IWorkbook workbook = application.Workbooks.Open("Sample.xlsx");
//Initialize ExcelToPdfConverter
ExcelToPdfConverter converter = new ExcelToPdfConverter(workbook);
@@ -93,4 +92,4 @@ By executing the program, you will get the **PDF document** as follows.
Click [here](https://www.syncfusion.com/document-processing/excel-framework/net) to explore the rich set of Syncfusion® Excel library (XlsIO) features.
-An online sample link to [convert an Excel document to PDF](https://ej2.syncfusion.com/aspnetmvc/Excel/ExcelToPDF#/material3) in ASP.NET MVC.
+An online sample link to [convert an Excel document to PDF](https://ej2.syncfusion.com/aspnetmvc/Excel/ExcelToPDF#/material3) in ASP.NET MVC.
\ No newline at end of file
diff --git a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-asp-net.md b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-asp-net.md
index c30031899..1afdb7fb1 100644
--- a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-asp-net.md
+++ b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-asp-net.md
@@ -70,8 +70,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream excelStream = new FileStream("Sample.xlsx", FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(excelStream);
+ IWorkbook workbook = application.Workbooks.Open("Sample.xlsx");
//Initialize ExcelToPdfConverter
ExcelToPdfConverter converter = new ExcelToPdfConverter(workbook);
@@ -99,4 +98,4 @@ By executing the program, you will get the **PDF document** as follows.
Click [here](https://www.syncfusion.com/document-processing/excel-framework/net) to explore the rich set of Syncfusion® Excel library (XlsIO) features.
-An online sample link to [convert an Excel document to PDF](https://ej2.syncfusion.com/aspnetmvc/Excel/ExcelToPDF#/material3) in ASP.NET MVC.
+An online sample link to [convert an Excel document to PDF](https://ej2.syncfusion.com/aspnetmvc/Excel/ExcelToPDF#/material3) in ASP.NET MVC.
\ No newline at end of file
diff --git a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-aws-lambda.md b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-aws-lambda.md
index c430767ff..a35cdff86 100644
--- a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-aws-lambda.md
+++ b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-aws-lambda.md
@@ -71,8 +71,7 @@ public string FunctionHandler(string input, ILambdaContext context)
//Initializes the SubstituteFont event to perform font substitution during Excel-to-PDF conversion
application.SubstituteFont += new SubstituteFontEventHandler(SubstituteFont);
- FileStream excelStream = new FileStream(@"Data/Sample.xlsx", FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(excelStream);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/Sample.xlsx"));
//Initialize XlsIO renderer.
XlsIORenderer renderer = new XlsIORenderer();
diff --git a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-azure-app-service-linux.md b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-azure-app-service-linux.md
index b784c445f..5feef030a 100644
--- a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-azure-app-service-linux.md
+++ b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-azure-app-service-linux.md
@@ -68,8 +68,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream excelStream = new FileStream("Sample.xlsx", FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(excelStream);
+ IWorkbook workbook = application.Workbooks.Open("Sample.xlsx");
//Initialize XlsIO renderer.
XlsIORenderer renderer = new XlsIORenderer();
@@ -140,4 +139,4 @@ You can download a complete working sample from [GitHub](https://github.com/Sync
Click [here](https://www.syncfusion.com/document-processing/excel-framework/net-core) to explore the rich set of Syncfusion® Excel library (XlsIO) features.
-An online sample link to [convert an Excel document to PDF](https://ej2.syncfusion.com/aspnetcore/Excel/ExcelToPDF#/material3) in ASP.NET Core.
+An online sample link to [convert an Excel document to PDF](https://ej2.syncfusion.com/aspnetcore/Excel/ExcelToPDF#/material3) in ASP.NET Core.
\ No newline at end of file
diff --git a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-azure-app-service-windows.md b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-azure-app-service-windows.md
index a78c15da9..74976da2f 100644
--- a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-azure-app-service-windows.md
+++ b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-azure-app-service-windows.md
@@ -60,8 +60,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream excelStream = new FileStream("Sample.xlsx", FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(excelStream);
+ IWorkbook workbook = application.Workbooks.Open("Sample.xlsx");
//Initialize XlsIO renderer.
XlsIORenderer renderer = new XlsIORenderer();
@@ -132,4 +131,4 @@ You can download a complete working sample from [GitHub](https://github.com/Sync
Click [here](https://www.syncfusion.com/document-processing/excel-framework/net-core) to explore the rich set of Syncfusion® Excel library (XlsIO) features.
-An online sample link to [convert an Excel document to PDF](https://ej2.syncfusion.com/aspnetcore/Excel/ExcelToPDF#/material3) in ASP.NET Core.
+An online sample link to [convert an Excel document to PDF](https://ej2.syncfusion.com/aspnetcore/Excel/ExcelToPDF#/material3) in ASP.NET Core.
\ No newline at end of file
diff --git a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-blazor.md b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-blazor.md
index 4311f2abc..e03a29da1 100644
--- a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-blazor.md
+++ b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-blazor.md
@@ -86,27 +86,23 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
+
+ // Open the workbook.
+ IWorkbook workbook = application.Workbooks.Open(@"wwwroot/InputTemplate.xlsx");
- //Load an existing file
- using (FileStream sourceStreamPath = new FileStream(@"wwwroot/InputTemplate.xlsx", FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
- {
- // Open the workbook.
- IWorkbook workbook = application.Workbooks.Open(sourceStreamPath);
+ // Instantiate the Excel to PDF renderer.
+ XlsIORenderer renderer = new XlsIORenderer();
- // Instantiate the Excel to PDF renderer.
- XlsIORenderer renderer = new XlsIORenderer();
+ //Convert Excel document into PDF document
+ PdfDocument pdfDocument = renderer.ConvertToPDF(workbook);
- //Convert Excel document into PDF document
- PdfDocument pdfDocument = renderer.ConvertToPDF(workbook);
+ //Create the MemoryStream to save the converted PDF.
+ MemoryStream pdfStream = new MemoryStream();
- //Create the MemoryStream to save the converted PDF.
- MemoryStream pdfStream = new MemoryStream();
-
- //Save the converted PDF document to MemoryStream.
- pdfDocument.Save(pdfStream);
- pdfStream.Position = 0;
- return pdfStream;
- }
+ //Save the converted PDF document to MemoryStream.
+ pdfDocument.Save(pdfStream);
+ pdfStream.Position = 0;
+ return pdfStream;
}
{% endhighlight %}
{% endtabs %}
@@ -245,26 +241,22 @@ using (ExcelEngine excelEngine = new ExcelEngine())
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- //Load an existing file
- using (FileStream sourceStreamPath = new FileStream(@"wwwroot/InputTemplate.xlsx", FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
- {
- // Open the workbook.
- IWorkbook workbook = application.Workbooks.Open(sourceStreamPath);
+ // Open the workbook.
+ IWorkbook workbook = application.Workbooks.Open(@"wwwroot/InputTemplate.xlsx");
- // Instantiate the Excel to PDF renderer.
- XlsIORenderer renderer = new XlsIORenderer();
+ // Instantiate the Excel to PDF renderer.
+ XlsIORenderer renderer = new XlsIORenderer();
- //Convert Excel document into PDF document
- PdfDocument pdfDocument = renderer.ConvertToPDF(workbook);
+ //Convert Excel document into PDF document
+ PdfDocument pdfDocument = renderer.ConvertToPDF(workbook);
- //Create the MemoryStream to save the converted PDF.
- MemoryStream pdfStream = new MemoryStream();
+ //Create the MemoryStream to save the converted PDF.
+ MemoryStream pdfStream = new MemoryStream();
- //Save the converted PDF document to MemoryStream.
- pdfDocument.Save(pdfStream);
- pdfStream.Position = 0;
- return pdfStream;
- }
+ //Save the converted PDF document to MemoryStream.
+ pdfDocument.Save(pdfStream);
+ pdfStream.Position = 0;
+ return pdfStream;
}
{% endhighlight %}
{% endtabs %}
@@ -333,8 +325,8 @@ By executing the program, you will get the **PDF document** as follows.

Click [here](https://www.syncfusion.com/document-processing/excel-framework/blazor) to explore the rich set of Syncfusion® Excel library (XlsIO) features.
-
-An online sample link to [convert an Excel document to PDF](https://blazor.syncfusion.com/demos/excel/excel-to-pdf?theme=fluent) in Blazor.
+
+An online sample link to convert an Excel document to PDF in Blazor.
## Excel to PDF in Blazor WASM app
@@ -663,8 +655,8 @@ By executing the program, you will get the **PDF document** as follows.
N> To convert Excel to PDF, it is necessary to access the font stream internally. However, this cannot be done automatically in a Blazor WASM application. Therefore, we recommend using a Server app, even though Excel to PDF conversion works in a WASM app.
Click [here](https://www.syncfusion.com/document-processing/excel-framework/blazor) to explore the rich set of Syncfusion® Excel library (XlsIO) features.
-
-An online sample link to [convert an Excel document to PDF](https://blazor.syncfusion.com/demos/excel/excel-to-pdf?theme=fluent) in Blazor.
+
+An online sample link to convert an Excel document to PDF in Blazor.
## Excel to PDF in .NET MAUI Blazor Hybrid App
@@ -886,4 +878,4 @@ By executing the program, you will get the **PDF document** as follows.
Click [here](https://www.syncfusion.com/document-processing/excel-framework/blazor) to explore the rich set of Syncfusion® Excel library (XlsIO) features.
-An online sample link to [convert an Excel document to PDF](https://blazor.syncfusion.com/demos/excel/excel-to-pdf?theme=fluent) in Blazor.
+An online sample link to convert an Excel document to PDF in Blazor.
diff --git a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-console-application.md b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-console-application.md
index 40f0aad4b..b63ff1229 100644
--- a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-console-application.md
+++ b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-console-application.md
@@ -51,25 +51,16 @@ using (ExcelEngine excelEngine = new ExcelEngine())
application.DefaultVersion = ExcelVersion.Xlsx;
//Load existing Excel file
- FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/Sample.xlsx"), FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/Sample.xlsx"));
//Convert to PDF
XlsIORenderer renderer = new XlsIORenderer();
PdfDocument pdfDocument = renderer.ConvertToPDF(workbook);
- //Create the MemoryStream to save the converted PDF.
- MemoryStream pdfStream = new MemoryStream();
-
#region Save
//Saving the workbook
- FileStream outputStream = new FileStream(Path.GetFullPath("Output/Sample.pdf"), FileMode.Create, FileAccess.Write);
- pdfDocument.Save(outputStream);
+ pdfDocument.Save(Path.GetFullPath("Output/Sample.pdf"));
#endregion
-
- //Dispose streams
- outputStream.Dispose();
- inputStream.Dispose();
}
{% endhighlight %}
{% endtabs %}
@@ -119,25 +110,16 @@ using (ExcelEngine excelEngine = new ExcelEngine())
application.DefaultVersion = ExcelVersion.Xlsx;
//Load existing Excel file
- FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/Sample.xlsx"), FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/Sample.xlsx"));
//Convert to PDF
XlsIORenderer renderer = new XlsIORenderer();
PdfDocument pdfDocument = renderer.ConvertToPDF(workbook);
- //Create the MemoryStream to save the converted PDF
- MemoryStream pdfStream = new MemoryStream();
-
#region Save
//Saving the workbook
- FileStream outputStream = new FileStream(Path.GetFullPath("Output/Sample.pdf"), FileMode.Create, FileAccess.Write);
- pdfDocument.Save(outputStream);
+ pdfDocument.Save(Path.GetFullPath("Output/Sample.pdf"));
#endregion
-
- //Dispose streams
- outputStream.Dispose();
- inputStream.Dispose();
}
{% endhighlight %}
{% endtabs %}
@@ -187,8 +169,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream excelStream = new FileStream("Sample.xlsx", FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(excelStream);
+ IWorkbook workbook = application.Workbooks.Open("Sample.xlsx");
//Initialize ExcelToPdfConverter
ExcelToPdfConverter converter = new ExcelToPdfConverter(workbook);
diff --git a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-docker.md b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-docker.md
index e2e7d68d7..b1c146a98 100644
--- a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-docker.md
+++ b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-docker.md
@@ -50,8 +50,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream excelStream = new FileStream("InputTemplate.xlsx", FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(excelStream);
+ IWorkbook workbook = application.Workbooks.Open("InputTemplate.xlsx");
//Initialize XlsIO renderer.
XlsIORenderer renderer = new XlsIORenderer();
@@ -59,9 +58,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
//Convert Excel document into PDF document
PdfDocument pdfDocument = renderer.ConvertToPDF(workbook);
- //Create the FileStream to save the converted PDF.
- FileStream pdfStream = new FileStream("Output.pdf", FileMode.Create, FileAccess.ReadWrite);
- pdfDocument.Save(pdfStream);
+ //Save the converted PDF.
+ pdfDocument.Save("Output.pdf");
}
{% endhighlight %}
{% endtabs %}
diff --git a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-google-app-engine.md b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-google-app-engine.md
index b98869b69..c20bab45c 100644
--- a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-google-app-engine.md
+++ b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-google-app-engine.md
@@ -102,8 +102,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream excelStream = new FileStream("Sample.xlsx", FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(excelStream);
+ IWorkbook workbook = application.Workbooks.Open("Sample.xlsx");
//Initialize XlsIO renderer.
XlsIORenderer renderer = new XlsIORenderer();
diff --git a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-linux.md b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-linux.md
index 92d36638b..7d624606d 100644
--- a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-linux.md
+++ b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-linux.md
@@ -60,25 +60,16 @@ using (ExcelEngine excelEngine = new ExcelEngine())
application.DefaultVersion = ExcelVersion.Xlsx;
//Load existing Excel file
- FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/Sample.xlsx"), FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/Sample.xlsx"));
//Convert to PDF
XlsIORenderer renderer = new XlsIORenderer();
PdfDocument pdfDocument = renderer.ConvertToPDF(workbook);
- //Create the MemoryStream to save the converted PDF.
- MemoryStream pdfStream = new MemoryStream();
-
#region Save
//Saving the workbook
- FileStream outputStream = new FileStream(Path.GetFullPath("Output/Sample.pdf"), FileMode.Create, FileAccess.Write);
- pdfDocument.Save(outputStream);
+ pdfDocument.Save(Path.GetFullPath("Output/Sample.pdf"));
#endregion
-
- //Dispose streams
- outputStream.Dispose();
- inputStream.Dispose();
}
{% endhighlight %}
{% endtabs %}
@@ -135,25 +126,16 @@ using (ExcelEngine excelEngine = new ExcelEngine())
application.DefaultVersion = ExcelVersion.Xlsx;
//Load existing Excel file
- FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/Sample.xlsx"), FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/Sample.xlsx"));
//Convert to PDF
XlsIORenderer renderer = new XlsIORenderer();
PdfDocument pdfDocument = renderer.ConvertToPDF(workbook);
- //Create the MemoryStream to save the converted PDF.
- MemoryStream pdfStream = new MemoryStream();
-
#region Save
//Saving the workbook
- FileStream outputStream = new FileStream(Path.GetFullPath("Output/Sample.pdf"), FileMode.Create, FileAccess.Write);
- pdfDocument.Save(outputStream);
+ pdfDocument.Save(Path.GetFullPath("Output/Sample.pdf"));
#endregion
-
- //Dispose streams
- outputStream.Dispose();
- inputStream.Dispose();
}
{% endhighlight %}
{% endtabs %}
diff --git a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-mac.md b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-mac.md
index 0e8b8b1f7..75d18f0e9 100644
--- a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-mac.md
+++ b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-mac.md
@@ -50,25 +50,16 @@ using (ExcelEngine excelEngine = new ExcelEngine())
application.DefaultVersion = ExcelVersion.Xlsx;
//Load existing Excel file
- FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/Sample.xlsx"), FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/Sample.xlsx"));
//Convert to PDF
XlsIORenderer renderer = new XlsIORenderer();
PdfDocument pdfDocument = renderer.ConvertToPDF(workbook);
- //Create the MemoryStream to save the converted PDF.
- MemoryStream pdfStream = new MemoryStream();
-
#region Save
//Saving the workbook
- FileStream outputStream = new FileStream(Path.GetFullPath("Output/Sample.pdf"), FileMode.Create, FileAccess.Write);
- pdfDocument.Save(outputStream);
+ pdfDocument.Save(Path.GetFullPath("Output/Sample.pdf"));
#endregion
-
- //Dispose streams
- outputStream.Dispose();
- inputStream.Dispose();
}
{% endhighlight %}
{% endtabs %}
@@ -118,25 +109,16 @@ using (ExcelEngine excelEngine = new ExcelEngine())
application.DefaultVersion = ExcelVersion.Xlsx;
//Load existing Excel file
- FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/Sample.xlsx"), FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/Sample.xlsx"));
//Convert to PDF
XlsIORenderer renderer = new XlsIORenderer();
PdfDocument pdfDocument = renderer.ConvertToPDF(workbook);
- //Create the MemoryStream to save the converted PDF.
- MemoryStream pdfStream = new MemoryStream();
-
#region Save
//Saving the workbook
- FileStream outputStream = new FileStream(Path.GetFullPath("Output/Sample.pdf"), FileMode.Create, FileAccess.Write);
- pdfDocument.Save(outputStream);
+ pdfDocument.Save(Path.GetFullPath("Output/Sample.pdf"));
#endregion
-
- //Dispose streams
- outputStream.Dispose();
- inputStream.Dispose();
}
{% endhighlight %}
{% endtabs %}
diff --git a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-uwp.md b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-uwp.md
index 963bfa58a..c7d1cc753 100644
--- a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-uwp.md
+++ b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-uwp.md
@@ -65,26 +65,24 @@ using (ExcelEngine excelEngine = new ExcelEngine())
//Load an existing file
Assembly assembly = typeof(App).GetTypeInfo().Assembly;
- using (Stream inputStream = assembly.GetManifestResourceStream("Convert_Excel_to_PDF.InputTemplate.xlsx"))
- {
- IWorkbook workbook =application.Workbooks.Open(inputStream);
+
+ IWorkbook workbook =application.Workbooks.Open(assembly.GetManifestResourceStream("Convert_Excel_to_PDF.InputTemplate.xlsx"));
- //Initialize XlsIO renderer.
- XlsIORenderer renderer = new XlsIORenderer();
+ //Initialize XlsIO renderer.
+ XlsIORenderer renderer = new XlsIORenderer();
- //Convert Excel document into PDF document
- PdfDocument pdfDocument = renderer.ConvertToPDF(workbook);
+ //Convert Excel document into PDF document
+ PdfDocument pdfDocument = renderer.ConvertToPDF(workbook);
- //Create the MemoryStream to save the converted PDF.
- MemoryStream pdfStream = new MemoryStream();
+ //Create the MemoryStream to save the converted PDF.
+ MemoryStream pdfStream = new MemoryStream();
- //Save the converted PDF document to MemoryStream.
- pdfDocument.Save(pdfStream);
- pdfStream.Position = 0;
+ //Save the converted PDF document to MemoryStream.
+ pdfDocument.Save(pdfStream);
+ pdfStream.Position = 0;
- // Save the PDF file or perform any other action with the PDF
- SavePDF(pdfStream);
- }
+ // Save the PDF file or perform any other action with the PDF
+ SavePDF(pdfStream);
}
{% endhighlight %}
{% endtabs %}
diff --git a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-windows-forms.md b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-windows-forms.md
index c7feec1c9..f781fec94 100644
--- a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-windows-forms.md
+++ b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-windows-forms.md
@@ -73,8 +73,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream excelStream = new FileStream("Sample.xlsx", FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(excelStream);
+ IWorkbook workbook = application.Workbooks.Open("Sample.xlsx");
//Initialize ExcelToPdfConverter
ExcelToPdfConverter converter = new ExcelToPdfConverter(workbook);
@@ -99,5 +98,4 @@ By executing the program, you will get the **PDF document** as follows.
Click [here](https://www.syncfusion.com/document-processing/excel-framework/net) to explore the rich set of Syncfusion® Excel library (XlsIO) features.
-An online sample link to [convert an Excel document to PDF](https://ej2.syncfusion.com/aspnetcore/Excel/ExcelToPDF#/material3) in ASP.NET Core.
-
+An online sample link to [convert an Excel document to PDF](https://ej2.syncfusion.com/aspnetcore/Excel/ExcelToPDF#/material3) in ASP.NET Core.
\ No newline at end of file
diff --git a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-wpf.md b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-wpf.md
index 0b9fea57a..1c0826425 100644
--- a/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-wpf.md
+++ b/Document-Processing/Excel/Conversions/Excel-to-PDF/NET/convert-excel-to-pdf-in-wpf.md
@@ -60,8 +60,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream excelStream = new FileStream("Sample.xlsx", FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(excelStream);
+ IWorkbook workbook = application.Workbooks.Open("Sample.xlsx");
//Initialize ExcelToPdfConverter
ExcelToPdfConverter converter = new ExcelToPdfConverter(workbook);
diff --git a/Document-Processing/Excel/Excel-Library/NET/Custom-XML-Support.md b/Document-Processing/Excel/Excel-Library/NET/Custom-XML-Support.md
index d8cf1e8a4..f072a883a 100644
--- a/Document-Processing/Excel/Excel-Library/NET/Custom-XML-Support.md
+++ b/Document-Processing/Excel/Excel-Library/NET/Custom-XML-Support.md
@@ -38,13 +38,9 @@ using (ExcelEngine excelEngine = new ExcelEngine())
#region Save
//Saving the workbook
- FileStream outputStream = new FileStream(Path.GetFullPath("Output/CreateCustomXML.xlsx"), FileMode.Create, FileAccess.Write);
- workbook.SaveAs(outputStream);
+ workbook.SaveAs(Path.GetFullPath("Output/CreateCustomXML.xlsx"));
#endregion
- //Dispose streams
- outputStream.Dispose();
-
//Open default JSON
}
{% endhighlight %}
@@ -99,8 +95,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xlsx"), FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream, ExcelOpenType.Automatic);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"), ExcelOpenType.Automatic);
IWorksheet sheet = workbook.Worksheets[0];
//Access CustomXmlPart from Workbook
@@ -113,13 +108,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
#region Save
//Saving the workbook
- FileStream outputStream = new FileStream(Path.GetFullPath("Output/ReadXml.xlsx"), FileMode.Create, FileAccess.Write);
- workbook.SaveAs(outputStream);
+ workbook.SaveAs(Path.GetFullPath("Output/ReadXml.xlsx"));
#endregion
-
- //Dispose streams
- outputStream.Dispose();
- inputStream.Dispose();
}
{% endhighlight %}
diff --git a/Document-Processing/Excel/Excel-Library/NET/Security.md b/Document-Processing/Excel/Excel-Library/NET/Security.md
index 956768c09..1497efcd4 100644
--- a/Document-Processing/Excel/Excel-Library/NET/Security.md
+++ b/Document-Processing/Excel/Excel-Library/NET/Security.md
@@ -36,10 +36,9 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/InputExcel.xlsx"), FileMode.Open, FileAccess.ReadWrite);
//Open Excel
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputExcel.xlsx"));
IWorksheet worksheet = workbook.Worksheets[0];
//Encrypt workbook with password
@@ -47,13 +46,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
#region Save
//Saving the workbook
- FileStream outputStream = new FileStream(Path.GetFullPath("Output/EncryptedWorkbook.xlsx"), FileMode.Create, FileAccess.Write);
- workbook.SaveAs(outputStream);
+ workbook.SaveAs(Path.GetFullPath("Output/EncryptedWorkbook.xlsx"));
#endregion
-
- //Dispose streams
- outputStream.Dispose();
- inputStream.Dispose();
}
{% endhighlight %}
@@ -141,10 +135,9 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/EncryptedWorkbook.xlsx"), FileMode.Open, FileAccess.ReadWrite);
//Open encrypted Excel document with password
- IWorkbook workbook = application.Workbooks.Open(inputStream, ExcelParseOptions.Default, false, "syncfusion");
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/EncryptedWorkbook.xlsx"), ExcelParseOptions.Default, false, "syncfusion");
IWorksheet worksheet = workbook.Worksheets[0];
//Decrypt workbook
@@ -152,13 +145,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
#region Save
//Saving the workbook
- FileStream outputStream = new FileStream(Path.GetFullPath("Output/DecryptedWorkbook.xlsx"), FileMode.Create, FileAccess.Write);
- workbook.SaveAs(outputStream);
+ workbook.SaveAs(Path.GetFullPath("Output/DecryptedWorkbook.xlsx"));
#endregion
-
- //Dispose streams
- outputStream.Dispose();
- inputStream.Dispose();
}
{% endhighlight %}
@@ -204,10 +192,9 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/InputWorkbook.xlsx"), FileMode.Open, FileAccess.ReadWrite);
//Open Excel
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputWorkbook.xlsx"));
IWorksheet worksheet = workbook.Worksheets[0];
//Protect workbook with password
@@ -215,13 +202,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
#region Save
//Saving the workbook
- FileStream outputStream = new FileStream(Path.GetFullPath("Output/ProtectedWorkbook.xlsx"), FileMode.Create, FileAccess.Write);
- workbook.SaveAs(outputStream);
+ workbook.SaveAs(Path.GetFullPath("Output/ProtectedWorkbook.xlsx"));
#endregion
-
- //Dispose streams
- outputStream.Dispose();
- inputStream.Dispose();
}
{% endhighlight %}
@@ -271,10 +253,9 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/InputWorkbook.xlsx"), FileMode.Open, FileAccess.ReadWrite);
//Open Excel
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputWorkbook.xlsx"));
IWorksheet worksheet = workbook.Worksheets[0];
//UnProtect workbook with password
@@ -282,13 +263,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
#region Save
//Saving the workbook
- FileStream outputStream = new FileStream(Path.GetFullPath("Output/UnProtectedWorkbook.xlsx"), FileMode.Create, FileAccess.Write);
- workbook.SaveAs(outputStream);
+ workbook.SaveAs(Path.GetFullPath("Output/UnProtectedWorkbook.xlsx"));
#endregion
-
- //Dispose streams
- outputStream.Dispose();
- inputStream.Dispose();
}
{% endhighlight %}
@@ -332,10 +308,9 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/InputData.xlsx"), FileMode.Open, FileAccess.ReadWrite);
//Open Excel
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputData.xlsx"));
IWorksheet worksheet = workbook.Worksheets[0];
//Protect worksheet with multiple options
@@ -343,13 +318,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
#region Save
//Saving the workbook
- FileStream outputStream = new FileStream(Path.GetFullPath("Output/ProtectedSheet.xlsx"), FileMode.Create, FileAccess.Write);
- workbook.SaveAs(outputStream);
+ workbook.SaveAs(Path.GetFullPath("Output/ProtectedSheet.xlsx"));
#endregion
-
- //Dispose streams
- outputStream.Dispose();
- inputStream.Dispose();
}
{% endhighlight %}
@@ -472,17 +442,14 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Excel2013;
- FileStream inputStream = new FileStream("ChartSheet.xlsx", FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open("ChartSheet.xlsx");
IChart chart = workbook.Charts[0];
//Protect chart sheet
chart.Protect("syncfusion", ExcelSheetProtection.All);
- //Saving the workbook as stream
- FileStream stream = new FileStream("Output.xlsx", FileMode.Create, FileAccess.ReadWrite);
- workbook.SaveAs(stream);
- stream.Dispose();
+ //Saving the workbook
+ workbook.SaveAs("Output.xlsx");
}
{% endhighlight %}
@@ -526,10 +493,9 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/ProtectedWorksheet.xlsx"), FileMode.Open, FileAccess.ReadWrite);
//Open Excel
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/ProtectedWorksheet.xlsx"));
IWorksheet worksheet = workbook.Worksheets[0];
//UnProtect worksheet with password
@@ -537,13 +503,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
#region Save
//Saving the workbook
- FileStream outputStream = new FileStream(Path.GetFullPath("Output/UnProtectedSheet.xlsx"), FileMode.Create, FileAccess.Write);
- workbook.SaveAs(outputStream);
+ workbook.SaveAs(Path.GetFullPath("Output/UnProtectedSheet.xlsx"));
#endregion
-
- //Dispose streams
- outputStream.Dispose();
- inputStream.Dispose();
}
{% endhighlight %}
@@ -589,17 +550,14 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Excel2013;
- FileStream inputStream = new FileStream("Sample.xlsx", FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open("Sample.xlsx");
IChart chart = workbook.Charts[0];
//Unprotect chart sheet
chart.Unprotect("syncfusion");
- //Saving the workbook as stream
- FileStream stream = new FileStream("Output.xlsx", FileMode.Create, FileAccess.ReadWrite);
- workbook.SaveAs(stream);
- stream.Dispose();
+ //Saving the workbook
+ workbook.SaveAs("Output.xlsx");
}
{% endhighlight %}
@@ -645,10 +603,9 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/InputData.xlsx"), FileMode.Open, FileAccess.ReadWrite);
//Open Excel
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputData.xlsx"));
IWorksheet worksheet = workbook.Worksheets[0];
//Unlock cell
@@ -656,13 +613,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
#region Save
//Saving the workbook
- FileStream outputStream = new FileStream(Path.GetFullPath("Output/LockedCells.xlsx"), FileMode.Create, FileAccess.Write);
- workbook.SaveAs(outputStream);
+ workbook.SaveAs(Path.GetFullPath("Output/LockedCells.xlsx"));
#endregion
-
- //Dispose streams
- outputStream.Dispose();
- inputStream.Dispose();
}
{% endhighlight %}
diff --git a/Document-Processing/Excel/Excel-Library/NET/Slicer.md b/Document-Processing/Excel/Excel-Library/NET/Slicer.md
index fdc0a219c..9b76a0334 100644
--- a/Document-Processing/Excel/Excel-Library/NET/Slicer.md
+++ b/Document-Processing/Excel/Excel-Library/NET/Slicer.md
@@ -25,8 +25,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream("Sample.xlsx", FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream, ExcelOpenType.Automatic);
+ IWorkbook workbook = application.Workbooks.Open("Sample.xlsx", ExcelOpenType.Automatic);
IWorksheet sheet = workbook.Worksheets[0];
//Access the table.
@@ -35,9 +34,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
//Add slicer for the table.
sheet.Slicers.Add(table, 3, 11, 2);
- FileStream stream = new FileStream("Output.xlsx", FileMode.Create, FileAccess.ReadWrite);
- workbook.SaveAs(stream);
- stream.Dispose();
+ workbook.SaveAs("Output.xlsx");
}
{% endhighlight %}
@@ -266,8 +263,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream("Sample.xlsx", FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream, ExcelOpenType.Automatic);
+ IWorkbook workbook = application.Workbooks.Open("Sample.xlsx", ExcelOpenType.Automatic);
IWorksheet sheet = workbook.Worksheets[0];
//Access the table
@@ -306,9 +302,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
//Slicer style
slicer.SlicerStyle = ExcelSlicerStyle.SlicerStyleDark2;
- FileStream stream = new FileStream("Output.xlsx", FileMode.Create, FileAccess.ReadWrite);
- workbook.SaveAs(stream);
- stream.Dispose();
+ workbook.SaveAs("Output.xlsx");
}
{% endhighlight %}
diff --git a/Document-Processing/Excel/Excel-Library/NET/Working-with-Macros.md b/Document-Processing/Excel/Excel-Library/NET/Working-with-Macros.md
index e7215bcee..b44e8e1dc 100644
--- a/Document-Processing/Excel/Excel-Library/NET/Working-with-Macros.md
+++ b/Document-Processing/Excel/Excel-Library/NET/Working-with-Macros.md
@@ -446,8 +446,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
IVbaModules vbaModules = project.Modules;
//Opening form module existing workbook
- FileStream input = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xls"), FileMode.Open, FileAccess.ReadWrite);
- IWorkbook newBook = application.Workbooks.Open(input);
+ IWorkbook newBook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xls"));
IVbaProject newProject = newBook.VbaProject;
@@ -470,7 +469,6 @@ using (ExcelEngine excelEngine = new ExcelEngine())
#endregion
//Dispose streams
- input.Dispose();
outputStream.Dispose();
}
{% endhighlight %}
@@ -779,8 +777,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xls"), FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream, ExcelOpenType.Automatic);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xls"), ExcelOpenType.Automatic);
IWorksheet sheet = workbook.Worksheets[0];
//Accessing Vba project
@@ -804,7 +801,6 @@ using (ExcelEngine excelEngine = new ExcelEngine())
#endregion
//Dispose streams
- inputStream.Dispose();
outputStream.Dispose();
}
{% endhighlight %}
@@ -900,8 +896,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xls"), FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream, ExcelOpenType.Automatic);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xls"), ExcelOpenType.Automatic);
IWorksheet sheet = workbook.Worksheets[0];
//Accessing Vba project
@@ -920,7 +915,6 @@ using (ExcelEngine excelEngine = new ExcelEngine())
#endregion
//Dispose streams
- inputStream.Dispose();
outputStream.Dispose();
}
{% endhighlight %}
@@ -988,8 +982,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xls"), FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream, ExcelOpenType.Automatic);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xls"), ExcelOpenType.Automatic);
IWorksheet sheet = workbook.Worksheets[0];
//Accessing Vba project
@@ -1008,7 +1001,6 @@ using (ExcelEngine excelEngine = new ExcelEngine())
#endregion
//Dispose streams
- inputStream.Dispose();
outputStream.Dispose();
}
{% endhighlight %}
@@ -1074,8 +1066,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xls"), FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream, ExcelOpenType.Automatic);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xls"), ExcelOpenType.Automatic);
IWorksheet sheet = workbook.Worksheets[0];
//Accessing Vba project
@@ -1094,7 +1085,6 @@ using (ExcelEngine excelEngine = new ExcelEngine())
#endregion
//Dispose streams
- inputStream.Dispose();
outputStream.Dispose();
}
{% endhighlight %}
@@ -1161,8 +1151,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xls"), FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream, ExcelOpenType.Automatic);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xls"), ExcelOpenType.Automatic);
IWorksheet sheet = workbook.Worksheets[0];
//Skip Macros while saving
@@ -1175,7 +1164,6 @@ using (ExcelEngine excelEngine = new ExcelEngine())
#endregion
//Dispose streams
- inputStream.Dispose();
outputStream.Dispose();
}
{% endhighlight %}
diff --git a/Document-Processing/Excel/Excel-Library/NET/Worksheet-Cells-Manipulation.md b/Document-Processing/Excel/Excel-Library/NET/Worksheet-Cells-Manipulation.md
index adeb28de7..2c30d15b9 100644
--- a/Document-Processing/Excel/Excel-Library/NET/Worksheet-Cells-Manipulation.md
+++ b/Document-Processing/Excel/Excel-Library/NET/Worksheet-Cells-Manipulation.md
@@ -126,6 +126,8 @@ The following code example illustrates how to access the range relatively to the
N> Here row and column indexes in the range are "one-based".
+N> When **ExcelRangeIndexerMode** is set to **Relative**, only numeric index access is relative to the specified range. In this mode, row and column indexes are one-based and reference cells within the range. Cell name based references (example A1, B5) always points to the worksheet and returns results from the worksheet origin rather than from the specified range.
+
{% tabs %}
{% highlight c# tabtitle="C# [Cross-platform]" playgroundButtonLink="https://raw.githubusercontent.com/SyncfusionExamples/XlsIO-Examples/master/Editing%20Excel%20cells/Access%20Relative%20Range/.NET/Access%20Relative%20Range/Access%20Relative%20Range/Program.cs,180" %}
using (ExcelEngine excelEngine = new ExcelEngine())
@@ -1074,4 +1076,4 @@ A complete working example to clear cell content in an Excel worksheet in C# is
The [IRange](https://help.syncfusion.com/cr/document-processing/Syncfusion.XlsIO.IRange.html) interface offers a robust collection of properties for in-depth manipulation and management of Excel worksheet ranges.
-With the Syncfusion® Excel Library, you can perform various operations under IRange in an Excel worksheet using C#. Click [here](https://help.syncfusion.com/document-processing/excel/excel-library/net/cells-manipulation/list-of-apis-under-irange) for more details.
\ No newline at end of file
+With the Syncfusion® Excel Library, you can perform various operations under IRange in an Excel worksheet using C#. Click [here](https://help.syncfusion.com/document-processing/excel/excel-library/net/cells-manipulation/list-of-apis-under-irange) for more details.
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/How-to-retain-cell-values-after-removing-formulas-in-Excel.md b/Document-Processing/Excel/Excel-Library/NET/faqs/How-to-retain-cell-values-after-removing-formulas-in-Excel.md
index 98d3dae43..1b0e600f2 100644
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/How-to-retain-cell-values-after-removing-formulas-in-Excel.md
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/How-to-retain-cell-values-after-removing-formulas-in-Excel.md
@@ -18,8 +18,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream("InputTemplate.xlsx", FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open("InputTemplate.xlsx");
IWorksheet worksheet = workbook.Worksheets[0];
//Enable sheet calculation
@@ -41,10 +40,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
}
}
- //Saving the workbook as stream
- FileStream outputStream = new FileStream("Output.xlsx", FileMode.Create, FileAccess.ReadWrite);
- workbook.SaveAs(outputStream);
- outputStream.Dispose();
+ //Saving the workbook
+ workbook.SaveAs("Output.xlsx");
}
{% endhighlight %}
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/can-xlsio-determine-PDF-page-count-before-Excel-to-PDF-conversion.md b/Document-Processing/Excel/Excel-Library/NET/faqs/can-xlsio-determine-PDF-page-count-before-Excel-to-PDF-conversion.md
deleted file mode 100644
index 16da732ac..000000000
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/can-xlsio-determine-PDF-page-count-before-Excel-to-PDF-conversion.md
+++ /dev/null
@@ -1,11 +0,0 @@
----
-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.
\ No newline at end of file
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/does-xlsio-support-auto-correcting-formulas.md b/Document-Processing/Excel/Excel-Library/NET/faqs/does-xlsio-support-auto-correcting-formulas.md
new file mode 100644
index 000000000..0e618b8f7
--- /dev/null
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/does-xlsio-support-auto-correcting-formulas.md
@@ -0,0 +1,17 @@
+---
+title: Support for auto-correcting formulas | Syncfusion
+description: This page explains whether Syncfusion XlsIO supports auto-correcting formulas using Syncfusion .NET Excel library (XlsIO).
+platform: document-processing
+control: XlsIO
+documentation: UG
+---
+
+# Does XlsIO support auto-correcting formulas?
+
+No, Syncfusion XlsIO does not support auto-correcting or recalculating formulas automatically when loading Excel files. To resolve this, open and resave the Excel file using Microsoft Excel. This triggers formula evaluation and updates the cached results. Once resaved, XlsIO can process the file and return the correct values.
+
+Alternatively, invoke the Calculate method of IWorksheet to evaluate and update all formulas in the worksheet.
+
+Use the EnableSheetCalculations method of IWorksheet to initialize CalcEngine objects and retrieve calculated values of formulas in a worksheet. On completion of worksheet calculation, invoke the DisableSheetCalculations method of IWorksheet to dispose all CalcEngine objects.
+
+For more details, please refer to Working with Formulas | Syncfusion.
\ No newline at end of file
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/does-xlsio-support-internal-links-when-converting-Excel-to-PDF.md b/Document-Processing/Excel/Excel-Library/NET/faqs/does-xlsio-support-internal-links-when-converting-Excel-to-PDF.md
deleted file mode 100644
index fdd3c01a8..000000000
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/does-xlsio-support-internal-links-when-converting-Excel-to-PDF.md
+++ /dev/null
@@ -1,11 +0,0 @@
----
-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.
\ No newline at end of file
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/does-xlsio-support-opacity-or-transparency-for-cell-background-colors-in-Excel.md b/Document-Processing/Excel/Excel-Library/NET/faqs/does-xlsio-support-opacity-or-transparency-for-cell-background-colors-in-Excel.md
deleted file mode 100644
index 82ce72ea8..000000000
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/does-xlsio-support-opacity-or-transparency-for-cell-background-colors-in-Excel.md
+++ /dev/null
@@ -1,21 +0,0 @@
----
-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.
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/does-xlsio-support-reading-Excel-from-azure-blob-storage.md b/Document-Processing/Excel/Excel-Library/NET/faqs/does-xlsio-support-reading-Excel-from-azure-blob-storage.md
new file mode 100644
index 000000000..95a058aa4
--- /dev/null
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/does-xlsio-support-reading-Excel-from-azure-blob-storage.md
@@ -0,0 +1,15 @@
+---
+title: Support for reading Excel directly from Azure streams | Syncfusion
+description: This page explains whether Syncfusion XlsIO supports reading Excel files directly from Azure Blob Storage streams using Syncfusion .NET Excel library (XlsIO).
+platform: document-processing
+control: XlsIO
+documentation: UG
+---
+
+# Does XlsIO support reading Excel from Azure Blob Storage?
+
+No, Syncfusion XlsIO does not support reading Excel files directly from Azure Blob Storage streams due to stream compatibility limitations. Excel files (.xlsx) are internally ZIP packages, and XlsIO requires a seekable stream to parse and decompress their structure. Streams provided by Azure Blob Storage are typically non-seekable and optimized for forward only access, which is not suitable for ZIP based formats like Excel.
+
+The recommended approach is to first download the blob content into a MemoryStream. This ensures the stream is seekable and compatible with XlsIO for parsing and decompression. In general, when working with blob content that needs to be parsed or decompressed such as Excel or ZIP files, loading into a memory buffer is the correct approach.
+
+For implementation details, please refer to Loading and saving Excel document in Azure Cloud Storage.
\ No newline at end of file
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/does-xlsio-support-the-multiline-header-footer-support.md b/Document-Processing/Excel/Excel-Library/NET/faqs/does-xlsio-support-the-multiline-header-footer-support.md
index 100fe20fd..90ce14455 100644
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/does-xlsio-support-the-multiline-header-footer-support.md
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/does-xlsio-support-the-multiline-header-footer-support.md
@@ -34,8 +34,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
pageSetup.RightFooter = "Right Footer Line 1\nRight Footer Line 2";
//Save the excel file
- FileStream outputStream = new FileStream("Output.xlsx", FileMode.OpenOrCreate, FileAccess.ReadWrite);
- workbook.SaveAs(outputStream);
+ workbook.SaveAs("Output.xlsx");
workbook.Close();
excelEngine.Dispose();
}
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-does-excel-file-with-uninstalled-fonts-is-converted-to-pdf-image.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-does-excel-file-with-uninstalled-fonts-is-converted-to-pdf-image.md
index eff65fcd2..f22b5ba74 100644
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-does-excel-file-with-uninstalled-fonts-is-converted-to-pdf-image.md
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-does-excel-file-with-uninstalled-fonts-is-converted-to-pdf-image.md
@@ -19,8 +19,7 @@ The following code snippet shows how to use font substitution in Excel to PDF co
using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
- FileStream fileStream = new FileStream("Sample.xlsx", FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(fileStream);
+ IWorkbook workbook = application.Workbooks.Open("Sample.xlsx");
//Initializes the SubstituteFont event to perform font substitution during Excel to PDF conversion
application.SubstituteFont += new SubstituteFontEventHandler(SubstituteFont);
@@ -28,8 +27,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
XlsIORenderer renderer = new XlsIORenderer();
PdfDocument pdfDocument = renderer.ConvertToPDF(workbook);
- FileStream stream = new FileStream("Output.pdf", FileMode.OpenOrCreate, FileAccess.ReadWrite);
- pdfDocument.Save(stream);
+ pdfDocument.Save("Output.pdf");
}
private static void SubstituteFont(object sender, SubstituteFontEventArgs args)
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-many-hyperlinks-can-a-single-cell-contain-in-Excel.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-many-hyperlinks-can-a-single-cell-contain-in-Excel.md
deleted file mode 100644
index b88b1a059..000000000
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-many-hyperlinks-can-a-single-cell-contain-in-Excel.md
+++ /dev/null
@@ -1,11 +0,0 @@
----
-title: Hyperlinks in a single cell in Excel | Syncfusion
-description: Learn about how many hyperlinks can a single cell contain in Excel using Syncfusion .NET Excel library (XlsIO).
-platform: document-processing
-control: XlsIO
-documentation: UG
----
-
-# How many hyperlinks can a single cell contain in Excel?
-
-In Microsoft Excel, a single cell can contain only **one hyperlink**. It is not possible to assign multiple hyperlinks to the same cell. This limitation applies when working with Excel manually or programmatically using the Syncfusion .NET Excel library (XlsIO).
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-access-a-table-in-Excel-document-using-the-table-name.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-access-a-table-in-Excel-document-using-the-table-name.md
index 5a9121427..08eb31b6f 100644
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-access-a-table-in-Excel-document-using-the-table-name.md
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-access-a-table-in-Excel-document-using-the-table-name.md
@@ -16,8 +16,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream("D:../../../Data/InputTemplate.xlsx", FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open("InputTemplate.xlsx");
IWorksheet worksheet = workbook.Worksheets[0];
//Initialize the table
@@ -38,9 +37,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
}
}
- //Saving the workbook as stream
- FileStream outputStream = new FileStream("Output.xlsx", FileMode.Create, FileAccess.ReadWrite);
- workbook.SaveAs(outputStream);
+ //Saving the workbook
+ workbook.SaveAs("Output.xlsx");
}
{% endhighlight %}
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-add-Barcode-in-Excel-document.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-add-Barcode-in-Excel-document.md
index bff77c51a..158bbd941 100644
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-add-Barcode-in-Excel-document.md
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-add-Barcode-in-Excel-document.md
@@ -25,8 +25,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
worksheet.Pictures.AddPicture(15, 10, barcode2);
// Save to file system
- FileStream stream = new FileStream("Output.xlsx",FileMode.OpenOrCreate, FileAccess.ReadWrite);
- workbook.SaveAs(stream);
+ workbook.SaveAs("Output.xlsx");
workbook.Close();
excelEngine.Dispose();
}
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-add-and-remove-page-breaks-in-Excel.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-add-and-remove-page-breaks-in-Excel.md
index 07254d5e7..43a5656fb 100644
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-add-and-remove-page-breaks-in-Excel.md
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-add-and-remove-page-breaks-in-Excel.md
@@ -38,12 +38,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
//Setting sheet view to see the page breaks
worksheet.View = SheetView.PageBreakPreview;
- //Saving the workbook as stream
- FileStream outputStream = new FileStream("Output.xlsx", FileMode.Create, FileAccess.ReadWrite);
- workbook.SaveAs(outputStream);
-
- //Dispose streams
- outputStream.Dispose();
+ //Saving the workbook
+ workbook.SaveAs("Output.xlsx");
}
{% endhighlight %}
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-add-oval-shape-to-Excel-chart.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-add-oval-shape-to-Excel-chart.md
index 822e446b1..70e58c8b1 100644
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-add-oval-shape-to-Excel-chart.md
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-add-oval-shape-to-Excel-chart.md
@@ -1,6 +1,6 @@
---
title: How to add Oval shape to Excel chart using XlsIO | Syncfusion
-description: Code example to add Oval shape to Excel chart using Syncfusion .NET Excel library (XlsIO).
+description: This page explains how to add Oval shape to Excel chart in C# (cross-platform and Windows-specific) and VB.NET using Syncfusion .NET Excel library (XlsIO).
platform: document-processing
control: XlsIO
documentation: UG
@@ -35,12 +35,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
#region Save
//Saving the workbook
- FileStream outputStream = new FileStream(Path.GetFullPath("Output.xlsx"), FileMode.Create, FileAccess.Write);
- workbook.SaveAs(outputStream);
+ workbook.SaveAs("Output.xlsx");
#endregion
-
- //Dispose streams
- outputStream.Dispose();
}
{% endhighlight %}
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-apply-TimePeriod-conditional-formatting-in-Excel.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-apply-TimePeriod-conditional-formatting-in-Excel.md
index 84d12a1f9..ce32da596 100644
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-apply-TimePeriod-conditional-formatting-in-Excel.md
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-apply-TimePeriod-conditional-formatting-in-Excel.md
@@ -18,8 +18,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/Input.xlsx"), FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/Input.xlsx"));
IWorksheet worksheet = workbook.Worksheets[0];
//Apply conditional format for specific time period
@@ -34,12 +33,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
conditionalFormat.BackColor = ExcelKnownColors.Sky_blue;
//Saving the workbook
- FileStream outputStream = new FileStream(Path.GetFullPath("Output/Output.xlsx"), FileMode.Create, FileAccess.Write);
- workbook.SaveAs(outputStream);
-
- //Dispose streams
- outputStream.Dispose();
- inputStream.Dispose();
+ workbook.SaveAs(Path.GetFullPath("Output/Output.xlsx"));
}
{% endhighlight %}
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-apply-custom-filtering-to-string-data-types-using-XlsIO.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-apply-custom-filtering-to-string-data-types-using-XlsIO.md
deleted file mode 100644
index b29c3092b..000000000
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-apply-custom-filtering-to-string-data-types-using-XlsIO.md
+++ /dev/null
@@ -1,86 +0,0 @@
----
-title: Apply custom filtering to string data types using XlsIO | Syncfusion
-description: Code example to apply custom filtering to string data types using Syncfusion .NET Excel library (XlsIO).
-platform: document-processing
-control: XlsIO
-documentation: UG
----
-
-# How to apply custom filtering to string data types using XlsIO?
-
-The following code snippets illustrate how to apply custom filtering to string data types in C# (cross-platform and Windows-specific) and VB.NET.
-
-{% tabs %}
-{% highlight c# tabtitle="C# [Cross-platform]" playgroundButtonLink="https://raw.githubusercontent.com/SyncfusionExamples/XlsIO-Examples/master/FAQ/Filtering/.NET/Custom%20Filter%20String%20Type/CustomFilterStringType/Program.cs,180" %}
-using (ExcelEngine excelEngine = new ExcelEngine())
-{
- IApplication application = excelEngine.Excel;
- application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/Input.xlsx"), FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
- IWorksheet worksheet = workbook.Worksheets[0];
-
- //Creating an AutoFilter
- worksheet.AutoFilters.FilterRange = worksheet.Range["A1:A11"];
- IAutoFilter filter = worksheet.AutoFilters[0];
-
- //Specifying first condition
- IAutoFilterCondition firstCondition = filter.FirstCondition;
- firstCondition.ConditionOperator = ExcelFilterCondition.DoesNotContain;
- firstCondition.String = "1000.00";
-
- //Saving the workbook
- FileStream outputStream = new FileStream(Path.GetFullPath(@"Output/Output.xlsx"), FileMode.Create, FileAccess.Write);
- workbook.SaveAs(outputStream);
-
- //Dispose streams
- outputStream.Dispose();
- inputStream.Dispose();
-}
-{% 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("Input.xlsx");
- IWorksheet worksheet = workbook.Worksheets[0];
-
- //Creating an AutoFilter
- worksheet.AutoFilters.FilterRange = worksheet.Range["A1:A11"];
- IAutoFilter filter = worksheet.AutoFilters[0];
-
- //Specifying first condition
- IAutoFilterCondition firstCondition = filter.FirstCondition;
- firstCondition.ConditionOperator = ExcelFilterCondition.DoesNotContain;
- firstCondition.String = "1000.00";
-
- //Saving the workbook
- workbook.SaveAs("Output.xlsx");
-}
-{% endhighlight %}
-
-{% highlight vb.net tabtitle="VB.NET [Windows-specific]" %}
-Using excelEngine As New ExcelEngine()
- Dim application As IApplication = excelEngine.Excel
- application.DefaultVersion = ExcelVersion.Xlsx
- Dim workbook As IWorkbook = application.Workbooks.Open("Sample.xlsx")
- Dim sheet As IWorksheet = workbook.Worksheets(0)
-
- 'Creating an AutoFilter
- sheet.AutoFilters.FilterRange = sheet.Range("A1:A11")
- Dim filter As IAutoFilter = sheet.AutoFilters(0)
-
- 'Specifying first condition
- Dim firstCondition As IAutoFilterCondition = filter.FirstCondition
- firstCondition.ConditionOperator = ExcelFilterCondition.DoesNotContain
- firstCondition.String = 1000.0
-
- 'Saving the workbook
- workbook.SaveAs("Output.xlsx")
-End Using
-{% endhighlight %}
-{% endtabs %}
-
-A complete working example to apply custom filtering to string data types using C# is present on this GitHub page.
\ No newline at end of file
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-apply-formatting-to-pivottable-in-Excel-protected-view.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-apply-formatting-to-pivottable-in-Excel-protected-view.md
index 336b7de27..5e1faa19c 100644
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-apply-formatting-to-pivottable-in-Excel-protected-view.md
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-apply-formatting-to-pivottable-in-Excel-protected-view.md
@@ -16,8 +16,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream fileStream = new FileStream("Sample.xlsx", FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(fileStream);
+ IWorkbook workbook = application.Workbooks.Open("Sample.xlsx");
IWorksheet worksheet = workbook.Worksheets[0];
IWorksheet pivotSheet = workbook.Worksheets[1];
@@ -40,10 +39,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
pivotTable.BuiltInStyle = PivotBuiltInStyles.PivotStyleDark15;
pivotTable.Layout();
- //Saving the workbook as stream
- FileStream stream = new FileStream("Output.xlsx", FileMode.Create, FileAccess.ReadWrite);
- workbook.SaveAs(stream);
- stream.Dispose();
+ //Saving the workbook
+ workbook.SaveAs("Output.xlsx");
}
{% endhighlight %}
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-apply-rotation-and-transparency-to-background-image.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-apply-rotation-and-transparency-to-background-image.md
index 390cdca26..4c409c017 100644
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-apply-rotation-and-transparency-to-background-image.md
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-apply-rotation-and-transparency-to-background-image.md
@@ -17,8 +17,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
IApplication application = excelEngine.Excel;
//Load an existing Excel file into IWorkbook
- FileStream inputStream = new FileStream("Sample.xlsx", FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open("Sample.xlsx");
IWorksheet worksheet = workbook.Worksheets[0];
System.Drawing.Image image = System.Drawing.Image.FromFile("image.png");
@@ -37,13 +36,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
#region Save
//Saving the workbook
- FileStream outputStream = new FileStream("Output.xlsx", FileMode.Create, FileAccess.Write);
- workbook.SaveAs(outputStream);
+ workbook.SaveAs("Output.xlsx");
#endregion
-
- //Dispose streams
- outputStream.Dispose();
- inputStream.Dispose();
}
{% endhighlight %}
{% endtabs %}
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-avoid-exception-when-adding-worksheets-with-same-name.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-avoid-exception-when-adding-worksheets-with-same-name.md
index 9b411ce7a..4b35085f8 100644
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-avoid-exception-when-adding-worksheets-with-same-name.md
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-avoid-exception-when-adding-worksheets-with-same-name.md
@@ -27,10 +27,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
IWorksheet sheet_1 = workbook.Worksheets.Create("Sheet");
IWorksheet sheet_2 = workbook.Worksheets.Create("Sheet");
- //Saving the workbook as stream
- FileStream file = new FileStream("Output.xlsx", FileMode.Create, FileAccess.ReadWrite);
- workbook.SaveAs(file);
- file.Dispose();
+ //Saving the workbook
+ workbook.SaveAs("Output.xlsx");
}
{% endhighlight %}
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-avoid-header-row-while-sorting-Excel-data.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-avoid-header-row-while-sorting-Excel-data.md
index d08f31105..ed34ad13e 100644
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-avoid-header-row-while-sorting-Excel-data.md
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-avoid-header-row-while-sorting-Excel-data.md
@@ -51,9 +51,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
sorter.Sort();
worksheet.UsedRange.AutofitColumns();
- FileStream stream = new FileStream("Output.xlsx", FileMode.Create, FileAccess.ReadWrite);
- workbook.SaveAs(stream);
- stream.Dispose();
+ workbook.SaveAs("Output.xlsx");
}
{% endhighlight %}
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-avoid-processing-unnecessary-worksheets-when-opening-an-Excel-document-using-C#.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-avoid-processing-unnecessary-worksheets-when-opening-an-Excel-document-using-C#.md
deleted file mode 100644
index 2c09e682d..000000000
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-avoid-processing-unnecessary-worksheets-when-opening-an-Excel-document-using-C#.md
+++ /dev/null
@@ -1,66 +0,0 @@
----
-title: How to avoid processing unnecessary worksheets when opening an Excel document using C# | Syncfusion
-description: Code example to avoid processing unnecessary worksheets when opening an Excel document using Syncfusion .NET Excel library (XlsIO).
-platform: document-processing
-control: XlsIO
-documentation: UG
----
-# How to avoid processing unnecessary worksheets when opening an Excel document using C#?
-XlsIO provides support to avoid processing unnecessary worksheets when opening an Excel. The following code snippet illustrates this.
-{% tabs %}
-{% highlight c# tabtitle="C# [Cross-platform]" playgroundButtonLink="https://raw.githubusercontent.com/SyncfusionExamples/XlsIO-Examples/master/FAQ/Worksheet/.NET/Parse%20Worksheets%20On%20Demand/Parse%20Worksheets%20On%20Demand/Program.cs,180" %}
-using (ExcelEngine excelEngine = new ExcelEngine())
-{
- IApplication application = excelEngine.Excel;
- application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream("Input.xlsx", FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream,ExcelOpenType.Automatic, ExcelParseOptions.ParseWorksheetsOnDemand);
-
- // Access the first worksheet (triggers parsing)
- IWorksheet worksheet = workbook.Worksheets[0];
-
- // Process your data
- string value = worksheet.Range["A1"].Text;
-
- // Save to file system
- FileStream stream = new FileStream("Output.xlsx", FileMode.OpenOrCreate, FileAccess.ReadWrite);
- workbook.SaveAs(stream);
- workbook.Close();
- excelEngine.Dispose();
-}
-{% 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("Input.xlsx",ExcelOpenType.Automatic,ExcelParseOptions.ParseWorksheetsOnDemand);
-
- // Access the first worksheet (triggers parsing)
- IWorksheet worksheet = workbook.Worksheets[0];
-
- // Process your data
- string value = worksheet.Range["A1"].Text;
- 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("Input.xlsx", ExcelParseOptions.ParseWorksheetsOnDemand)
-
- ' Access the first worksheet (triggers parsing)
- Dim worksheet As IWorksheet = workbook.Worksheets(0)
-
- ' Process your data...
- Dim value As String = worksheet.Range("A1").Text
-
- workbook.SaveAs("Output.xlsx")
- End Using
-{% endhighlight %}
-{% endtabs %}
-
-A complete working example to avoid processing unnecessary worksheets when opening an Excel document using C# is present on [this GitHub page](https://github.com/SyncfusionExamples/XlsIO-Examples/tree/master/FAQ/Worksheet/.NET/Parse%20Worksheets%20On%20Demand).
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-avoid-processing-unnecessary-worksheets-when-opening-an-Excel-document.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-avoid-processing-unnecessary-worksheets-when-opening-an-Excel-document.md
index 8e53defaa..efc82eaa6 100644
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-avoid-processing-unnecessary-worksheets-when-opening-an-Excel-document.md
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-avoid-processing-unnecessary-worksheets-when-opening-an-Excel-document.md
@@ -5,7 +5,7 @@ platform: document-processing
control: XlsIO
documentation: UG
---
-# How to avoid processing unnecessary worksheets when opening an Excel document using C#?
+# How to avoid processing unnecessary worksheets using C#?
XlsIO provides support to avoid processing unnecessary worksheets when opening an Excel. The following code snippet illustrates this.
{% tabs %}
{% highlight c# tabtitle="C# [Cross-platform]" playgroundButtonLink="https://raw.githubusercontent.com/SyncfusionExamples/XlsIO-Examples/master/FAQ/Worksheet/.NET/Parse%20Worksheets%20On%20Demand/Parse%20Worksheets%20On%20Demand/Program.cs,180" %}
@@ -13,8 +13,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream("Input.xlsx", FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream,ExcelOpenType.Automatic, ExcelParseOptions.ParseWorksheetsOnDemand);
+ IWorkbook workbook = application.Workbooks.Open("Input.xlsx",ExcelOpenType.Automatic, ExcelParseOptions.ParseWorksheetsOnDemand);
// Access the first worksheet (triggers parsing)
IWorksheet worksheet = workbook.Worksheets[0];
@@ -23,8 +22,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
string value = worksheet.Range["A1"].Text;
// Save to file system
- FileStream stream = new FileStream("Output.xlsx", FileMode.OpenOrCreate, FileAccess.ReadWrite);
- workbook.SaveAs(stream);
+ workbook.SaveAs("Output.xlsx");
workbook.Close();
excelEngine.Dispose();
}
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-change-data-point-label-color-of-a-waterfall-chart.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-change-data-point-label-color-of-a-waterfall-chart.md
index 10c88b294..8b51a47a4 100644
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-change-data-point-label-color-of-a-waterfall-chart.md
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-change-data-point-label-color-of-a-waterfall-chart.md
@@ -16,8 +16,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Excel2016;
- FileStream inputStream = new FileStream("Sample.xlsx", FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream,ExcelOpenType.Automatic);
+ IWorkbook workbook = application.Workbooks.Open("Sample.xlsx",ExcelOpenType.Automatic);
IWorksheet sheet = workbook.Worksheets[0];
//Accessing first chart in the sheet
@@ -27,10 +26,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
chart.Series[0].DataPoints[0].DataLabels.IsValue = true;
chart.Series[0].DataPoints[0].DataLabels.RGBColor = Color.Green;
- //Saving the workbook as stream
- FileStream stream = new FileStream("Waterfall.xlsx", FileMode.Create, FileAccess.ReadWrite);
- workbook.SaveAs(stream);
- stream.Dispose();
+ //Saving the workbook
+ workbook.SaveAs("Waterfall.xlsx");
}
{% endhighlight %}
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-change-the-shape-text-font.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-change-the-shape-text-font.md
index 20fc2fd75..45e205102 100644
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-change-the-shape-text-font.md
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-change-the-shape-text-font.md
@@ -16,8 +16,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream("Sample.xlsx", FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream, ExcelOpenType.Automatic);
+ IWorkbook workbook = application.Workbooks.Open("Sample.xlsx", ExcelOpenType.Automatic);
IWorksheet worksheet = workbook.Worksheets[0];
IFont font = workbook.CreateFont();
@@ -27,10 +26,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
IShape shape = worksheet.Shapes[0];
shape.TextFrame.TextRange.RichText.SetFont(1, 3, font);
- //Saving the workbook as stream
- FileStream stream = new FileStream("Output.xlsx", FileMode.Create, FileAccess.ReadWrite);
- workbook.SaveAs(stream);
- stream.Dispose();
+ //Saving the workbook
+ workbook.SaveAs("Output.xlsx");
}
{% endhighlight %}
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-check-whether-an-excel-document-contains-macro.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-check-whether-an-excel-document-contains-macro.md
index 1519f4f72..cfaf070c9 100644
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-check-whether-an-excel-document-contains-macro.md
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-check-whether-an-excel-document-contains-macro.md
@@ -18,18 +18,14 @@ using (ExcelEngine excelEngine = new ExcelEngine())
IApplication application = excelEngine.Excel;
//Opening form module existing workbook
- FileStream input = new FileStream("Test.xls", FileMode.Open, FileAccess.ReadWrite);
- IWorkbook workbook = application.Workbooks.Open(input);
+ IWorkbook workbook = application.Workbooks.Open("Test.xls");
IWorksheet sheet = workbook.Worksheets[0];
//Check macro exist
bool IsMacroEnabled = workbook.HasMacros;
// Save the workbook
- FileStream output = new FileStream("Output.xls", FileMode.Create, FileAccess.ReadWrite);
- workbook.SaveAs(output);
- input.Close();
- output.Close();
+ workbook.SaveAs("Output.xls");
}
{% endhighlight %}
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-check-whether-the-loaded-file-is-an-excel-file.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-check-whether-the-loaded-file-is-an-excel-file.md
index 3c9879450..67fe7fded 100644
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-check-whether-the-loaded-file-is-an-excel-file.md
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-check-whether-the-loaded-file-is-an-excel-file.md
@@ -25,10 +25,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
//Open the workbook
IWorkbook workbook = application.Workbooks.Open(inputStream);
- //Saving the workbook as stream
- FileStream outputStream = new FileStream("Output.xlsx", FileMode.Create, FileAccess.Write);
- workbook.SaveAs(outputStream);
- outputStream.Dispose();
+ //Saving the workbook
+ workbook.SaveAs("Output.xlsx");
}
else
{
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-convert-hidden-worksheets-alone-to-image.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-convert-hidden-worksheets-alone-to-image.md
index d499351f4..352b71c25 100644
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-convert-hidden-worksheets-alone-to-image.md
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-convert-hidden-worksheets-alone-to-image.md
@@ -21,8 +21,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
application.XlsIORenderer = new XlsIORenderer();
//Opening workbook with hidden worksheets
- FileStream inputStream = new FileStream("Sample.xlsx", FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open("Sample.xlsx");
//Converting only hidden worksheets to image
foreach (IWorksheet worksheet in workbook.Worksheets)
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-convert-image-from-url-in-excel-to-pdf.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-convert-image-from-url-in-excel-to-pdf.md
index bed4ff2aa..e79771512 100644
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-convert-image-from-url-in-excel-to-pdf.md
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-convert-image-from-url-in-excel-to-pdf.md
@@ -32,9 +32,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
//Convert Excel document into PDF document
PdfDocument pdfDocument = renderer.ConvertToPDF(workbook);
- FileStream stream = new FileStream("ExcelToPDF.pdf", FileMode.Create, FileAccess.ReadWrite);
- pdfDocument.Save(stream);
- stream.Dispose();
+ pdfDocument.Save("ExcelToPDF.pdf");
}
{% endhighlight %}
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-convert-json-document-to-csv-format-document.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-convert-json-document-to-csv-format-document.md
index c31c32918..a69a5bc75 100644
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-convert-json-document-to-csv-format-document.md
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-convert-json-document-to-csv-format-document.md
@@ -31,11 +31,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
sheet.ImportDataTable(dataTable, true, 1, 1);
//Saving the workbook as CSV
- FileStream outputStream = new FileStream(Path.GetFullPath("Output/Sample.csv"), FileMode.Create, FileAccess.ReadWrite);
- workbook.SaveAs(outputStream, ",");
-
- //Dispose streams
- outputStream.Dispose();
+ workbook.SaveAs(Path.GetFullPath("Output/Sample.csv"), ",");
}
{% endhighlight %}
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-convert-the-required-range-in-excel-to-pdf.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-convert-the-required-range-in-excel-to-pdf.md
index cf72e6147..11d76efa7 100644
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-convert-the-required-range-in-excel-to-pdf.md
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-convert-the-required-range-in-excel-to-pdf.md
@@ -16,8 +16,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream excelStream = new FileStream("ExceltoPDF.xlsx", FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(excelStream);
+ IWorkbook workbook = application.Workbooks.Open("ExceltoPDF.xlsx");
IWorksheet sheet = workbook.Worksheets[0];
XlsIORendererSettings settings = new XlsIORendererSettings();
@@ -35,10 +34,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
XlsIORenderer renderer = new XlsIORenderer();
//Convert Excel document into PDF document
PdfDocument pdfDocument = renderer.ConvertToPDF(tempWorksheet, settings);
- Stream stream = new FileStream("ExcelToPDF.pdf", FileMode.Create, FileAccess.ReadWrite);
- pdfDocument.Save(stream);
- excelStream.Dispose();
- stream.Dispose();
+ pdfDocument.Save("ExcelToPDF.pdf");
}
{% endhighlight %}
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-convert-xls-document-to-xlsx-format-document.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-convert-xls-document-to-xlsx-format-document.md
index 341b3f188..c0146c6b0 100644
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-convert-xls-document-to-xlsx-format-document.md
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-convert-xls-document-to-xlsx-format-document.md
@@ -18,16 +18,13 @@ using (ExcelEngine excelEngine = new ExcelEngine())
application.DefaultVersion = ExcelVersion.Xlsx;
//Loads an xls file
- FileStream fileStream = new FileStream("InputTemplate.xls", FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(fileStream);
+ IWorkbook workbook = application.Workbooks.Open("InputTemplate.xls");
//Set the workbook version to xlsx
workbook.Version = ExcelVersion.Xlsx;
- //Saving the workbook as stream in xlsx format
- FileStream stream = new FileStream("Output.xlsx", FileMode.Create, FileAccess.ReadWrite);
- workbook.SaveAs(stream);
- stream.Dispose();
+ //Saving the workbook in xlsx format
+ workbook.SaveAs("Output.xlsx");
}
{% endhighlight %}
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-delete-blank-rows-and-columns-in-a-worksheet.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-delete-blank-rows-and-columns-in-a-worksheet.md
index a1d12ac19..f28d58296 100644
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-delete-blank-rows-and-columns-in-a-worksheet.md
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-delete-blank-rows-and-columns-in-a-worksheet.md
@@ -18,8 +18,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream("InputTemplate.xlsx", FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open("InputTemplate.xlsx");
IWorksheet worksheet = workbook.Worksheets[0];
//Get the used range of the worksheet
@@ -43,13 +42,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
}
}
- //Saving the workbook as stream
- FileStream outputStream = new FileStream("Output.xlsx", FileMode.Create, FileAccess.ReadWrite);
- workbook.SaveAs(outputStream);
-
- //Dispose streams
- inputStream.Dispose();
- outputStream.Dispose();
+ //Saving the workbook
+ workbook.SaveAs("Output.xlsx");
}
{% endhighlight %}
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-delete-hyperlinks-from-worksheet-without-affecting-the-cell-styles.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-delete-hyperlinks-from-worksheet-without-affecting-the-cell-styles.md
index 9c8b4256e..c0ac1ca3e 100644
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-delete-hyperlinks-from-worksheet-without-affecting-the-cell-styles.md
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-delete-hyperlinks-from-worksheet-without-affecting-the-cell-styles.md
@@ -6,7 +6,7 @@ control: XlsIO
documentation: UG
---
-# How to delete hyperlinks from a worksheet without affecting the cell styles using C#?
+# How to delete worksheet hyperlinks without affecting cell styles?
You can remove hyperlinks from an Excel worksheet without altering the cell formatting using [HyperLinks]( https://help.syncfusion.com/cr/document-processing/Syncfusion.XlsIO.IWorksheet.html#Syncfusion_XlsIO_IWorksheet_HyperLinks) property of the [IWorksheet]( https://help.syncfusion.com/cr/document-processing/Syncfusion.XlsIO.IWorksheet.html) interface. Below are the code examples in C# (cross-platform and Windows-specific) and VB.NET to demonstrate how to do this.
@@ -16,14 +16,13 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream("Data/InputTemplate.xlsx", FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));
IWorksheet worksheet = workbook.Worksheets[0];
// Remove first hyperlink without affecting cell styles
HyperLinksCollection hyperlink = worksheet.HyperLinks as HyperLinksCollection;
hyperlink.Remove(hyperlink[0] as HyperLinkImpl);
- FileStream outputStream = new FileStream("Output/Output.xlsx", FileMode.Create, FileAccess.Write);
- workbook.SaveAs(outputStream);
+ FileStream outputStream = new FileStream(, FileMode.Create, FileAccess.Write);
+ workbook.SaveAs(Path.GetFullPath("Output/Output.xlsx"));
workbook.Close();
excelEngine.Dispose();
}
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-detect-merged-cells-in-Excel.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-detect-merged-cells-in-Excel.md
index f9406f776..6b93dedb2 100644
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-detect-merged-cells-in-Excel.md
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-detect-merged-cells-in-Excel.md
@@ -16,8 +16,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream fileStream = new FileStream("Sample.xlsx", FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(fileStream);
+ IWorkbook workbook = application.Workbooks.Open("Sample.xlsx");
IWorksheet worksheet = workbook.Worksheets[0];
//Create a new worksheet
@@ -32,10 +31,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
//Autofit the used range
mergedCells.UsedRange.AutofitColumns();
- //Saving the workbook as stream
- FileStream stream = new FileStream("Output.xlsx", FileMode.Create, FileAccess.ReadWrite);
- workbook.SaveAs(stream);
- stream.Dispose();
+ //Saving the workbook
+ workbook.SaveAs("Output.xlsx");
}
{% endhighlight %}
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-edit-external-workbook-reference-link.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-edit-external-workbook-reference-link.md
index 1a0e7c603..604b7ac59 100644
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-edit-external-workbook-reference-link.md
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-edit-external-workbook-reference-link.md
@@ -17,14 +17,12 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream("Sample.xlsx", FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open("Sample.xlsx");
string filepath = (workbook as WorkbookImpl).ExternWorkbooks[0].URL;
(workbook as WorkbookImpl).ExternWorkbooks[0].URL = DataPathBase + "Template.xlsx";
- FileStream outputStream = new FileStream("Output.xlsx", FileMode.Create, FileAccess.Write);
- workbook.SaveAs(outputStream);
+ workbook.SaveAs("Output.xlsx");
}
{% endhighlight %}
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-find-and-highlight-data-in-Excel.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-find-and-highlight-data-in-Excel.md
index 66090311b..c4fa32f21 100644
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-find-and-highlight-data-in-Excel.md
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-find-and-highlight-data-in-Excel.md
@@ -25,8 +25,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream("Sample.xlsx", FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream, ExcelOpenType.Automatic);
+ IWorkbook workbook = application.Workbooks.Open("Sample.xlsx", ExcelOpenType.Automatic);
IWorksheet worksheet = workbook.Worksheets[0];
//Finds a value 1500 in a sheet and highlights the cell which contains the value
@@ -35,10 +34,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
range.CellStyle.Color = ExcelKnownColors.Green;
}
- //Saving the workbook as stream
- FileStream stream = new FileStream("Output.xlsx", FileMode.Create, FileAccess.ReadWrite);
- workbook.SaveAs(stream);
- stream.Dispose();
+ //Saving the workbook
+ workbook.SaveAs("Output.xlsx");
}
{% endhighlight %}
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-find-and-replace-text-in-hyperlinks.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-find-and-replace-text-in-hyperlinks.md
index db1266481..8c6c667c1 100644
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-find-and-replace-text-in-hyperlinks.md
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-find-and-replace-text-in-hyperlinks.md
@@ -18,8 +18,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
application.DefaultVersion = ExcelVersion.Xlsx;
//Loads an existing file.
- FileStream inputstream = new FileStream("InputTemplate.xlsx", FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputstream);
+ IWorkbook workbook = application.Workbooks.Open("InputTemplate.xlsx");
IWorksheet sheet = workbook.Worksheets[0];
//Find and Replace text in hyperlinks
@@ -34,9 +33,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
}
// Saving the workbook
- FileStream outputstream = new FileStream("Output.xlsx", FileMode.Create, FileAccess.ReadWrite);
- workbook.SaveAs(outputstream);
- outputstream.Dispose();
+ workbook.SaveAs("Output.xlsx");
}
{% endhighlight %}
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-find-duplicate-values-in-the-Excel-document-using-formulas.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-find-duplicate-values-in-the-Excel-document-using-formulas.md
index c03d58031..075f69991 100644
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-find-duplicate-values-in-the-Excel-document-using-formulas.md
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-find-duplicate-values-in-the-Excel-document-using-formulas.md
@@ -18,8 +18,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
application.DefaultVersion = ExcelVersion.Xlsx;
//Loads an existing file.
- FileStream inputStream = new FileStream("InputTemplate.xlsx", FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open("InputTemplate.xlsx");
IWorksheet worksheet = workbook.Worksheets[0];
//Find duplicate values in the column
@@ -28,9 +27,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
worksheet.Range["D" + i].Formula = $"=IF(MATCH(C{i},C$2:C{i},0)=ROW(C{i})-1,1,0)";
}
- //Saving the workbook as stream
- FileStream outputStream = new FileStream("Output.xlsx", FileMode.Create, FileAccess.Write);
- workbook.SaveAs(outputStream);
+ //Saving the workbook
+ workbook.SaveAs("Output.xlsx");
}
{% endhighlight %}
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-find-values-with-a-matching-case-for-specific-column-in-Excel.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-find-values-with-a-matching-case-for-specific-column-in-Excel.md
index 3568e0708..30726b4d2 100644
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-find-values-with-a-matching-case-for-specific-column-in-Excel.md
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-find-values-with-a-matching-case-for-specific-column-in-Excel.md
@@ -15,8 +15,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream fileStream = new FileStream("Sample.xlsx", FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(fileStream, ExcelOpenType.Automatic);
+ IWorkbook workbook = application.Workbooks.Open("Sample.xlsx", ExcelOpenType.Automatic);
IWorksheet worksheet = workbook.Worksheets[0];
IRange[] range1 = (worksheet as WorksheetImpl).Find(worksheet.Range["C1"].EntireColumn, "90", ExcelFindType.Number, ExcelFindOptions.MatchCase, false);
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-get-RGB-values-of-a-cells-background-color.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-get-RGB-values-of-a-cells-background-color.md
deleted file mode 100644
index ee955af50..000000000
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-get-RGB-values-of-a-cells-background-color.md
+++ /dev/null
@@ -1,93 +0,0 @@
----
-title: Get RGB values of a cell's background color | Syncfusion
-description: Code example to get RGB values of a cell's background color using Syncfusion .NET Excel library (XlsIO).
-platform: document-processing
-control: XlsIO
-documentation: UG
----
-
-# How to get RGB values of a cell's background color?
-
-The following examples show how to get RGB values of a cell's background color in C# (cross-platform and Windows-specific) and VB.NET.
-
-{% tabs %}
-{% highlight c# tabtitle="C# [Cross-platform]" playgroundButtonLink="https://raw.githubusercontent.com/SyncfusionExamples/XlsIO-Examples/master/FAQ/RGB%20Value%20for%20Cell%20Color/.NET/RGB%20Value%20for%20Cell%20Color/RGBValueCellColor/Program.cs,180" %}
-using (ExcelEngine excelEngine = new ExcelEngine())
-{
- IApplication application = excelEngine.Excel;
- application.DefaultVersion = ExcelVersion.Xlsx;
- IWorkbook workbook = application.Workbooks.Create(1);
- IWorksheet worksheet = workbook.Worksheets[0];
-
- //Apply cell color
- worksheet.Range["A1"].CellStyle.ColorIndex = ExcelKnownColors.Custom50;
-
- //Get the RGB values of the cell color
- Color color = worksheet.Range["A1"].CellStyle.Color;
- byte red = color.R;
- byte green = color.G;
- byte blue = color.B;
-
- //Print the RGB values
- Console.WriteLine($"Red: {red}, Green: {green}, Blue: {blue}");
-
- //Save the workbook
- FileStream outputStream = new FileStream(Path.GetFullPath("Output/Output.xlsx"), FileMode.Create, FileAccess.Write);
- workbook.SaveAs(outputStream);
-
- //Dispose stream
- outputStream.Dispose();
-}
-{% endhighlight %}
-
-{% highlight c# tabtitle="C# [Windows-specific]" %}
-using (ExcelEngine excelEngine = new ExcelEngine())
-{
- IApplication application = excelEngine.Excel;
- application.DefaultVersion = ExcelVersion.Xlsx;
- IWorkbook workbook = application.Workbooks.Create(1);
- IWorksheet worksheet = workbook.Worksheets[0];
-
- //Apply cell color
- worksheet.Range["A1"].CellStyle.ColorIndex = ExcelKnownColors.Custom50;
-
- //Get the RGB values of the cell color
- Color color = worksheet.Range["A1"].CellStyle.Color;
- byte red = color.R;
- byte green = color.G;
- byte blue = color.B;
-
- //Print the RGB values
- Console.WriteLine($"Red: {red}, Green: {green}, Blue: {blue}");
-
- //Save the workbook
- workbook.SaveAs("Output.xlsx");
-}
-{% endhighlight %}
-
-{% highlight vb.net tabtitle="VB.NET [Windows-specific]" %}
-Using excelEngine As New ExcelEngine()
- Dim application As IApplication = excelEngine.Excel
- application.DefaultVersion = ExcelVersion.Xlsx
- Dim workbook As IWorkbook = application.Workbooks.Create(1)
- Dim worksheet As IWorksheet = workbook.Worksheets(0)
-
- 'Apply cell color
- worksheet.Range("A1").CellStyle.ColorIndex = ExcelKnownColors.Custom50
-
- 'Get the RGB values of the cell color
- Dim cellColor As Color = worksheet.Range("A1").CellStyle.Color
- Dim red As Byte = cellColor.R
- Dim green As Byte = cellColor.G
- Dim blue As Byte = cellColor.B
-
- 'Print the RGB values
- Console.WriteLine($"Red: {red}, Green: {green}, Blue: {blue}")
-
- 'Save the workbook
- workbook.SaveAs("Output.xlsx")
-End Using
-{% endhighlight %}
-{% endtabs %}
-
-A complete working example to get RGB values of a cell's background color is available on this GitHub page.
\ No newline at end of file
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-get-the-frozen-rows-and-columns-in-an-excel-document.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-get-the-frozen-rows-and-columns-in-an-excel-document.md
index 383c12ae2..b55541067 100644
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-get-the-frozen-rows-and-columns-in-an-excel-document.md
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-get-the-frozen-rows-and-columns-in-an-excel-document.md
@@ -16,8 +16,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream(@"../../../Data/InputTemplate.xlsx", FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));
IWorksheet worksheet = workbook.Worksheets[0];
//Get the pane record
@@ -34,9 +33,6 @@ using (ExcelEngine excelEngine = new ExcelEngine())
//Get the no of frozen columns
int frozencolumns = paneRecord.VerticalSplit;
-
- //Dispose streams
- inputStream.Dispose();
}
{% endhighlight %}
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-get-the-list-of-worksheet-names-in-an-Excel-workbook.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-get-the-list-of-worksheet-names-in-an-Excel-workbook.md
index e3df070e2..b0e56b885 100644
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-get-the-list-of-worksheet-names-in-an-Excel-workbook.md
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-get-the-list-of-worksheet-names-in-an-Excel-workbook.md
@@ -21,8 +21,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream("Data/Input.xlsx", FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/Input.xlsx"));
//Get the worksheets collection
WorksheetsCollection worksheets = workbook.Worksheets as WorksheetsCollection;
@@ -32,9 +31,6 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
Console.WriteLine(worksheet.Name);
}
-
- //Dispose streams
- inputStream.Dispose();
}
{% endhighlight %}
@@ -87,8 +83,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream("Data/Input.xlsx", FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/Input.xlsx"));
//Get the worksheets collection
WorksheetsCollection worksheets = workbook.Worksheets as WorksheetsCollection;
@@ -99,9 +94,6 @@ using (ExcelEngine excelEngine = new ExcelEngine())
if (worksheet.Visibility == WorksheetVisibility.Visible)
Console.WriteLine(worksheet.Name);
}
-
- //Dispose streams
- inputStream.Dispose();
}
{% endhighlight %}
@@ -158,8 +150,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream("Data/Input.xlsx", FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/Input.xlsx"));
//Get the worksheets collection
WorksheetsCollection worksheets = workbook.Worksheets as WorksheetsCollection;
@@ -170,9 +161,6 @@ using (ExcelEngine excelEngine = new ExcelEngine())
if (worksheet.Visibility == WorksheetVisibility.Hidden)
Console.WriteLine(worksheet.Name);
}
-
- //Dispose streams
- inputStream.Dispose();
}
{% endhighlight %}
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-hide-columns-using-column-name.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-hide-columns-using-column-name.md
index 46b3b3a12..37d903326 100644
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-hide-columns-using-column-name.md
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-hide-columns-using-column-name.md
@@ -18,8 +18,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
application.DefaultVersion = ExcelVersion.Xlsx;
//Loads an existing file
- FileStream inputStream = new FileStream("InputTemplate.xlsx", FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open("InputTemplate.xlsx");
IWorksheet worksheet = workbook.Worksheets[0];
List columnsToHide = new List { "column1", "column2", "column3" };
@@ -36,10 +35,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
}
}
- //Saving the workbook as stream
- FileStream stream = new FileStream("Output.xlsx", FileMode.Create, FileAccess.ReadWrite);
- workbook.SaveAs(stream);
- stream.Dispose();
+ //Saving the workbook
+ workbook.SaveAs("Output.xlsx");
}
{% endhighlight %}
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-open-an-excel-document-that-is-already-open-in-msexcel.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-open-an-excel-document-that-is-already-open-in-msexcel.md
index 478cde104..c2d62f627 100644
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-open-an-excel-document-that-is-already-open-in-msexcel.md
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-open-an-excel-document-that-is-already-open-in-msexcel.md
@@ -18,10 +18,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Excel2016;
- FileStream inputStream = new FileStream("Template.xlsx", FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
- FileStream outputStream = new FileStream("Output.xlsx", FileMode.Create, FileAccess.ReadWrite);
- workbook.SaveAs(outputStream);
+ IWorkbook workbook = application.Workbooks.Open("Template.xlsx");
+ workbook.SaveAs("Output.xlsx");
}
{% endhighlight %}
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-open-an-excel-file-with-encoding-in-net-core.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-open-an-excel-file-with-encoding-in-net-core.md
index 10c805db6..fdd699f01 100644
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-open-an-excel-file-with-encoding-in-net-core.md
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-open-an-excel-file-with-encoding-in-net-core.md
@@ -16,13 +16,11 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
- FileStream stream = new FileStream("Sample.csv", FileMode.Open, FileAccess.Read);
- System.Text.UnicodeEncoding.RegisterProvider(System.Text.CodePagesEncodingProvider.Instance);
- IWorkbook workbook = application.Workbooks.Open(stream, System.Text.UnicodeEncoding.GetEncoding("big5"));
+ System.Text.UnicodeEncoding.RegisterProvider(System.Text.CodePagesEncodingProvider.Instance);
+ IWorkbook workbook = application.Workbooks.Open("Sample.csv", System.Text.UnicodeEncoding.GetEncoding("big5"));
- FileStream outputStream = new FileStream("Output.csv", FileMode.Create, FileAccess.Write);
- workbook.SaveAs(outputStream, ",");
+ workbook.SaveAs("Output.csv", ",");
}
{% endhighlight %}
-{% endtabs %}
+{% endtabs %}
\ No newline at end of file
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-override-an-Excel-document.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-override-an-Excel-document.md
index 972e2bded..37e2a567c 100644
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-override-an-Excel-document.md
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-override-an-Excel-document.md
@@ -20,24 +20,16 @@ using (ExcelEngine excelEngine = new ExcelEngine())
application.DefaultVersion = ExcelVersion.Xlsx;
//Open an existing Excel file as stream
- FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/Sample.xlsx"), FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/Sample.xlsx"));
IWorksheet worksheet = workbook.Worksheets[0];
//Modify the data
worksheet.Range["A1"].Text = "Hello World";
- //Dispose input stream
- inputStream.Dispose();
-
#region Save
//Saving the workbook
- FileStream outputStream = new FileStream(Path.GetFullPath("Output/Sample.xlsx"), FileMode.Create, FileAccess.Write);
- workbook.SaveAs(outputStream);
+ workbook.SaveAs(Path.GetFullPath("Output/Sample.xlsx"));
#endregion
-
- //Dispose output stream
- outputStream.Dispose();
}
{% endhighlight %}
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-read-filtered-rows-in-excel.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-read-filtered-rows-in-excel.md
index a67409b5f..974641d1a 100644
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-read-filtered-rows-in-excel.md
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-read-filtered-rows-in-excel.md
@@ -16,8 +16,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream fileStream = new FileStream("Sample.xlsx", FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(fileStream, ExcelOpenType.Automatic);
+ IWorkbook workbook = application.Workbooks.Open("Sample.xlsx", ExcelOpenType.Automatic);
IWorksheet worksheet = workbook.Worksheets[0];
IRange usedRange = worksheet.UsedRange;
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-remove-autofilter-in-an-Excel.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-remove-autofilter-in-an-Excel.md
index 78e7edf16..2b93c6027 100644
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-remove-autofilter-in-an-Excel.md
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-remove-autofilter-in-an-Excel.md
@@ -18,17 +18,15 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream("InputTemplate.xlsx", FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open("InputTemplate.xlsx");
IWorksheet worksheet = workbook.Worksheets[0];
//Remove autofilter from worksheet
IAutoFilters filter = worksheet.AutoFilters;
filter.FilterRange = null;
- //Saving the workbook as stream
- FileStream OutputStream = new FileStream("Output.xlsx", FileMode.Create, FileAccess.ReadWrite);
- workbook.SaveAs(OutputStream);
+ //Saving the workbook
+ workbook.SaveAs("Output.xlsx");
}
{% endhighlight %}
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-remove-data-validation-from-the-specified-range.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-remove-data-validation-from-the-specified-range.md
index 27f3a40c6..d8d0e8524 100644
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-remove-data-validation-from-the-specified-range.md
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-remove-data-validation-from-the-specified-range.md
@@ -18,16 +18,14 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream("InputTemplate.xlsx", FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open("InputTemplate.xlsx");
IWorksheet worksheet = workbook.Worksheets[0];
//Removes data validation from the specified range
worksheet.Range["A1:C5"].Clear(ExcelClearOptions.ClearDataValidations);
- //Saving the workbook as stream
- FileStream OutputStream = new FileStream("Output.xlsx", FileMode.Create, FileAccess.ReadWrite);
- workbook.SaveAs(OutputStream);
+ //Saving the workbook
+ workbook.SaveAs("Output.xlsx");
}
{% endhighlight %}
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-resolve-excel-cannot-open-the-file-because-the-file-format-for-the-file-extension-is-not-valid.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-resolve-excel-cannot-open-the-file-because-the-file-format-for-the-file-extension-is-not-valid.md
index 37570bef6..9a16f7b31 100644
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-resolve-excel-cannot-open-the-file-because-the-file-format-for-the-file-extension-is-not-valid.md
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-resolve-excel-cannot-open-the-file-because-the-file-format-for-the-file-extension-is-not-valid.md
@@ -22,8 +22,7 @@ application.DefaultVersion = ExcelVersion.Excel2013;
//Do some manipulation
//Workbook is saved in Excel2013 format
-FileStream stream = new FileStream("Sample.xlsx", FileMode.OpenOrCreate, FileAccess.ReadWrite);
-workbook.SaveAs(stream);
+workbook.SaveAs("Sample.xlsx");
{% endhighlight %}
{% highlight c# tabtitle="C# [Windows-specific]" %}
@@ -66,12 +65,10 @@ These are represented in the below code snippet.
{% tabs %}
{% highlight c# tabtitle="C# [Cross-platform]" %}
workbook.Version = ExcelVersion.Excel97to2003;
-FileStream stream = new FileStream("Sample.xls", FileMode.OpenOrCreate, FileAccess.ReadWrite);
-workbook.SaveAs(stream);
+workbook.SaveAs("Sample.xls");
workbook.Version = ExcelVersion.Excel2013;
-FileStream stream1 = new FileStream("Sample.xlsx", FileMode.OpenOrCreate, FileAccess.ReadWrite);
-workbook.SaveAs(stream1);
+workbook.SaveAs("Sample.xlsx");
{% endhighlight %}
{% highlight c# tabtitle="C# [Windows-specific]" %}
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-resolve-performance-issue-when-deleting-a-large-number-of-rows.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-resolve-performance-issue-when-deleting-a-large-number-of-rows.md
index a68fca7d4..ea27b54ae 100644
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-resolve-performance-issue-when-deleting-a-large-number-of-rows.md
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-resolve-performance-issue-when-deleting-a-large-number-of-rows.md
@@ -20,8 +20,7 @@ using(ExcelEngine excelEngine = new ExcelEngine())
application.DefaultVersion = ExcelVersion.Xlsx;
//Loads an existing file
- FileStream fileStream = new FileStream("InputTemplate.xlsx", FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(fileStream);
+ IWorkbook workbook = application.Workbooks.Open("InputTemplate.xlsx");
IWorksheet worksheet = workbook.Worksheets[0];
IWorksheet newWorksheet = workbook.Worksheets[1];
@@ -44,10 +43,8 @@ using(ExcelEngine excelEngine = new ExcelEngine())
//Remove the worksheet
workbook.Worksheets[0].Remove();
- //Saving the workbook as stream
- FileStream stream = new FileStream("Output.xlsx", FileMode.Create, FileAccess.ReadWrite);
- workbook.SaveAs(stream);
- stream.Dispose();
+ //Saving the workbook
+ workbook.SaveAs("Output.xlsx");
}
{% endhighlight %}
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-resolve-the-file-does-not-contain-workbook-stream-error.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-resolve-the-file-does-not-contain-workbook-stream-error.md
index 0a9855a48..699b5cb5f 100644
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-resolve-the-file-does-not-contain-workbook-stream-error.md
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-resolve-the-file-does-not-contain-workbook-stream-error.md
@@ -16,8 +16,7 @@ ExcelEngine excelEngine = new ExcelEngine();
IApplication application = excelEngine.Excel;
//To check whether the file is supported
-FileStream stream = new FileStream("Sample.xls", FileMode.OpenOrCreate, FileAccess.ReadWrite);
-var isSupported = application.IsSupported(stream);
+var isSupported = application.IsSupported("Sample.xls");
excelEngine.Dispose();
{% endhighlight %}
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-save-the-edited-chages-in-the-same-excel-document.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-save-the-edited-chages-in-the-same-excel-document.md
index f4748cd19..d982fa5ee 100644
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-save-the-edited-chages-in-the-same-excel-document.md
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-save-the-edited-chages-in-the-same-excel-document.md
@@ -23,22 +23,14 @@ using (ExcelEngine excelEngine = new ExcelEngine())
string filepath = @"../../../Data/InputTemplate.xlsx";
//Load an Excel document
- FileStream fileStream = new FileStream(filepath, FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(fileStream);
+ IWorkbook workbook = application.Workbooks.Open(filepath);
IWorksheet worksheet = workbook.Worksheets[0];
//Set text in the cell
worksheet["B1"].Text = "Text";
- //Close the input stream before writing
- fileStream.Close();
-
//Save the workbook to the same file
- fileStream = new FileStream(filepath, FileMode.Create, FileAccess.Write);
- workbook.SaveAs(fileStream);
-
- //Dispose the stream
- fileStream.Dispose();
+ workbook.SaveAs(filepath);
}
{% endhighlight %}
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-search-a-value-in-only-specific-columns-of-an-Excel-worksheet.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-search-a-value-in-only-specific-columns-of-an-Excel-worksheet.md
index 385de73be..1441730d5 100644
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-search-a-value-in-only-specific-columns-of-an-Excel-worksheet.md
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-search-a-value-in-only-specific-columns-of-an-Excel-worksheet.md
@@ -15,8 +15,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream fileStream = new FileStream("Sample.xlsx", FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(fileStream, ExcelOpenType.Automatic);
+ IWorkbook workbook = application.Workbooks.Open("Sample.xlsx", ExcelOpenType.Automatic);
IWorksheet worksheet = workbook.Worksheets[0];
IRanges ranges = worksheet.CreateRangesCollection();
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-set-and-format-time-values-in-Excel-using-TimeSpan.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-set-and-format-time-values-in-Excel-using-TimeSpan.md
index c6b9f7964..b5bf3dd3f 100644
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-set-and-format-time-values-in-Excel-using-TimeSpan.md
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-set-and-format-time-values-in-Excel-using-TimeSpan.md
@@ -29,12 +29,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
#region Save
//Saving the workbook
- FileStream outputStream = new FileStream(Path.GetFullPath("Output.xlsx"), FileMode.Create, FileAccess.Write);
- workbook.SaveAs(outputStream);
+ workbook.SaveAs("Output.xlsx");
#endregion
-
- //Dispose streams
- outputStream.Dispose();
}
{% endhighlight %}
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-set-column-width-for-a-pivot-table-range-in-an-Excel-Document.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-set-column-width-for-a-pivot-table-range-in-an-Excel-Document.md
index 3436ec653..5c72fbb9a 100644
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-set-column-width-for-a-pivot-table-range-in-an-Excel-Document.md
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-set-column-width-for-a-pivot-table-range-in-an-Excel-Document.md
@@ -19,9 +19,7 @@ The following code examples demonstrate how to do this in C# (Cross-platform and
using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
- application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xlsx"), FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));
IWorksheet worksheet = workbook.Worksheets[0];
IWorksheet worksheet1 = workbook.Worksheets[1];
@@ -46,13 +44,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
#region Save
//Saving the workbook
- FileStream outputStream = new FileStream(Path.GetFullPath("Output/Output.xlsx"), FileMode.Create, FileAccess.Write);
- workbook.SaveAs(outputStream);
+ workbook.SaveAs(Path.GetFullPath("Output/Output.xlsx"));
#endregion
-
- //Dispose streams
- outputStream.Dispose();
- inputStream.Dispose();
}
{% endhighlight %}
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-set-error-bars-in-chart.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-set-error-bars-in-chart.md
index ee1ac6d65..3189c1143 100644
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-set-error-bars-in-chart.md
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-set-error-bars-in-chart.md
@@ -15,8 +15,7 @@ Charts can be enhanced by adding error bars which help to view the margin errors
using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
- FileStream inputStream = new FileStream("Sample.xlsx", FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream, ExcelOpenType.Automatic);
+ IWorkbook workbook = application.Workbooks.Open("Sample.xlsx", ExcelOpenType.Automatic);
IWorksheet sheet = workbook.Worksheets[0];
//Create a Chart
@@ -31,8 +30,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
//Set error bar
chart.Series[0].ErrorBar(true, ExcelErrorBarInclude.Plus, ExcelErrorBarType.Percentage, 50);
- FileStream stream = new FileStream("ErrorBars.xlsx", FileMode.OpenOrCreate, FileAccess.ReadWrite);
- workbook.SaveAs(stream);
+ workbook.SaveAs("ErrorBars.xlsx");
workbook.Close();
excelEngine.Dispose();
}
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-set-logarithmic-axis-for-chart-in-excel-document.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-set-logarithmic-axis-for-chart-in-excel-document.md
index 709afb8ea..180598f7e 100644
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-set-logarithmic-axis-for-chart-in-excel-document.md
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-set-logarithmic-axis-for-chart-in-excel-document.md
@@ -16,8 +16,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream("InputTemplate.xlsx", FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream, ExcelOpenType.Automatic);
+ IWorkbook workbook = application.Workbooks.Open("InputTemplate.xlsx", ExcelOpenType.Automatic);
IWorksheet sheet = workbook.Worksheets[0];
//Create a Chart
@@ -37,12 +36,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
valueAxis.LogBase = 10;
//Saving the workbook
- FileStream outputStream = new FileStream("Chart.xlsx", FileMode.Create, FileAccess.Write);
- workbook.SaveAs(outputStream);
-
- //Dispose streams
- outputStream.Dispose();
- inputStream.Dispose();
+ workbook.SaveAs("Chart.xlsx");
}
{% endhighlight %}
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-set-rounded-corner-for-chart-in-excel-document.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-set-rounded-corner-for-chart-in-excel-document.md
index 00fa2a305..10b254a87 100644
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-set-rounded-corner-for-chart-in-excel-document.md
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-set-rounded-corner-for-chart-in-excel-document.md
@@ -39,10 +39,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
serie.EnteredDirectlyValues = yValues;
serie.EnteredDirectlyCategoryLabels = xValues;
- //Saving the workbook as stream
- FileStream stream = new FileStream("Chart.xlsx", FileMode.Create, FileAccess.ReadWrite);
- workbook.SaveAs(stream);
- stream.Dispose();
+ //Saving the workbook
+ workbook.SaveAs("Chart.xlsx");
}
{% endhighlight %}
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-set-the-background-color-for-Excel-chart.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-set-the-background-color-for-Excel-chart.md
index 216f830e2..ff67889cd 100644
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-set-the-background-color-for-Excel-chart.md
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-set-the-background-color-for-Excel-chart.md
@@ -19,8 +19,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xlsx"), FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));
IWorksheet worksheet = workbook.Worksheets[0];
//Get the first chart in the worksheet
@@ -34,13 +33,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
#region Save
//Saving the workbook
- FileStream outputStream = new FileStream(Path.GetFullPath("Output/Output.xlsx"), FileMode.Create, FileAccess.Write);
- workbook.SaveAs(outputStream);
+ workbook.SaveAs(Path.GetFullPath("Output/Output.xlsx"));
#endregion
-
- //Dispose streams
- outputStream.Dispose();
- inputStream.Dispose();
}
{% endhighlight %}
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-set-the-default-font-and-font-size-in-an-Excel-workbook.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-set-the-default-font-and-font-size-in-an-Excel-workbook.md
index 6929d6d7a..011e5505d 100644
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-set-the-default-font-and-font-size-in-an-Excel-workbook.md
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-set-the-default-font-and-font-size-in-an-Excel-workbook.md
@@ -28,9 +28,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
sheet.Range["A1"].Text = "This is default font and size";
//Save to file
- FileStream outputStream = new FileStream("Output/Output.xlsx", FileMode.Create, FileAccess.Write);
- workbook.SaveAs(outputStream);
- outputStream.Dispose();
+ workbook.SaveAs(Path.GetFullPath("Output/Output.xlsx"));
}
{% endhighlight %}
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-set-traffic-lights-icon-in-Excel-conditional-formatting.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-set-traffic-lights-icon-in-Excel-conditional-formatting.md
index 0b631041b..7dc2ecc1d 100644
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-set-traffic-lights-icon-in-Excel-conditional-formatting.md
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-set-traffic-lights-icon-in-Excel-conditional-formatting.md
@@ -58,9 +58,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
iconSet.IconSet = ExcelIconSetType.ThreeTrafficLights1;
//Saving the workbook
- FileStream outputStream = new FileStream("Output.xlsx", FileMode.Create, FileAccess.Write);
- workbook.SaveAs(outputStream);
- outputStream.Dispose();
+ workbook.SaveAs("Output.xlsx");
}
{% endhighlight %}
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-show-the-leader-line-on-Excel-chart.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-show-the-leader-line-on-Excel-chart.md
index 0ffac42d4..7f7c5bcc0 100644
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-show-the-leader-line-on-Excel-chart.md
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-show-the-leader-line-on-Excel-chart.md
@@ -47,12 +47,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
#region Save
//Saving the workbook
- FileStream outputStream = new FileStream(Path.GetFullPath("Output.xlsx"), FileMode.Create, FileAccess.Write);
- workbook.SaveAs(outputStream);
+ workbook.SaveAs("Output.xlsx");
#endregion
-
- //Dispose streams
- outputStream.Dispose();
}
{% endhighlight %}
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-switch-chart-series-data-interpretation-from-horizontal-(rows)-to-vertical-(columns)-in-Excel.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-switch-chart-series-data-interpretation-from-horizontal-(rows)-to-vertical-(columns)-in-Excel.md
index b57176545..2bb682973 100644
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-switch-chart-series-data-interpretation-from-horizontal-(rows)-to-vertical-(columns)-in-Excel.md
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-switch-chart-series-data-interpretation-from-horizontal-(rows)-to-vertical-(columns)-in-Excel.md
@@ -57,12 +57,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
#region Save
//Saving the workbook
- FileStream outputStream = new FileStream(Path.GetFullPath("Output.xlsx"), FileMode.Create, FileAccess.Write);
- workbook.SaveAs(outputStream);
+ workbook.SaveAs("Output.xlsx");
#endregion
-
- //Dispose streams
- outputStream.Dispose();
}
{% endhighlight %}
diff --git a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-use-and-or-operators-in-the-filters.md b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-use-and-or-operators-in-the-filters.md
index f21c60f00..b78cf58df 100644
--- a/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-use-and-or-operators-in-the-filters.md
+++ b/Document-Processing/Excel/Excel-Library/NET/faqs/how-to-use-and-or-operators-in-the-filters.md
@@ -16,8 +16,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
- FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xlsx"), FileMode.Open, FileAccess.Read);
- IWorkbook workbook = application.Workbooks.Open(inputStream);
+ IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"));
IWorksheet worksheet = workbook.Worksheets[0];
#region Filter
@@ -41,13 +40,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
#region Save
//Saving the workbook
- FileStream outputStream = new FileStream(Path.GetFullPath("Output/Filter.xlsx"), FileMode.Create, FileAccess.Write);
- workbook.SaveAs(outputStream);
+ workbook.SaveAs(Path.GetFullPath("Output/Filter.xlsx"));
#endregion
-
- //Dispose streams
- outputStream.Dispose();
- inputStream.Dispose();
}
{% endhighlight %}
diff --git a/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/selection.md b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/selection.md
index de267efeb..47fe6e111 100644
--- a/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/selection.md
+++ b/Document-Processing/Excel/Spreadsheet/ASP-NET-CORE/selection.md
@@ -84,7 +84,7 @@ The following sample shows the column selection in the spreadsheet, here selecti
## Get selected cell values
-You can select single or multiple cells, rows, or columns using mouse and keyboard interactions. You can also programmatically perform selections using the [selectRange](https://helpej2.syncfusion.com/documentation/api/spreadsheet/#selectrange) method. This selection behavior is controlled by the [selectionSettings](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_SelectionSettings) property. Finally, you can retrieve the selected cell values as a collection using the [getData](https://helpej2.syncfusion.com/documentation/api/spreadsheet/#getdata) method.
+You can select single or multiple cells, rows, or columns using mouse and keyboard interactions. You can also programmatically perform selections using the [selectRange](https://helpej2.syncfusion.com/documentation/api/spreadsheet#selectrange) method. This selection behavior is controlled by the [selectionSettings](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Spreadsheet.Spreadsheet.html#Syncfusion_EJ2_Spreadsheet_Spreadsheet_SelectionSettings) property. Finally, you can retrieve the selected cell values as a collection using the [getData](https://helpej2.syncfusion.com/documentation/api/spreadsheet#getdata) method.
Below is a code example demonstrating how to retrieve the selected cell values as a collection programmatically:
diff --git a/Document-Processing/Excel/Spreadsheet/Blazor/accessibility.md b/Document-Processing/Excel/Spreadsheet/Blazor/accessibility.md
index eb55876d0..d32d15612 100644
--- a/Document-Processing/Excel/Spreadsheet/Blazor/accessibility.md
+++ b/Document-Processing/Excel/Spreadsheet/Blazor/accessibility.md
@@ -1,7 +1,7 @@
---
layout: post
title: Accessibility in Blazor Spreadsheet Component | Syncfusion
-description: Checkout and learn here all about accessibility in Syncfusion Blazor Spreadsheet component and much more.
+description: Learn about accessibility support in the Syncfusion Blazor Spreadsheet component, including WCAG 2.2, Section 508, keyboard shortcuts, and WAI-ARIA attributes.
platform: document-processing
control: Spreadsheet
documentation: ug
@@ -9,9 +9,17 @@ documentation: ug
# Accessibility in Blazor Spreadsheet
-The Syncfusion Blazor Spreadsheet followed the accessibility guidelines and standards, including [ADA](https://www.ada.gov/), [Section 508](https://www.section508.gov/), [WCAG 2.2](https://www.w3.org/TR/WCAG22/) standards, and [WCAG roles](https://www.w3.org/TR/wai-aria/#roles) that are commonly used to evaluate accessibility.
-
-The accessibility compliance for the Spreadsheet is outlined below.
+The Syncfusion Blazor Spreadsheet follows accessibility guidelines and standards, including [ADA](https://www.ada.gov/), [Section 508](https://www.section508.gov/), [WCAG 2.2](https://www.w3.org/TR/WCAG22/), and [WAI-ARIA](https://www.w3.org/TR/wai-aria/#roles) roles that are commonly used to evaluate accessibility.
+
+The accessibility compliance for the Spreadsheet component is outlined below.
+
- All features of the component meet the requirement.
+
- Some features of the component do not meet the requirement.
+
- The component does not meet the requirement.
| Accessibility Criteria | Compatibility |
| -- | -- |
@@ -24,39 +32,27 @@ The accessibility compliance for the Spreadsheet is outlined below.
| [Keyboard Navigation Support](https://blazor.syncfusion.com/documentation/common/accessibility#keyboard-navigation-support) | |
| [Axe-core Accessibility Validation](https://blazor.syncfusion.com/documentation/common/accessibility#ensuring-accessibility) | |
-
-
- All features of the component meet the requirement.
-
-
- Some features of the component do not meet the requirement.
-
-
- The component does not meet the requirement.
-
## WAI-ARIA attributes
-The Syncfusion Blazor Spreadsheet followed the WAI-ARIA patterns to meet the accessibility. The following ARIA attributes are used in the Spreadsheet:
+The Syncfusion Blazor Spreadsheet follows WAI-ARIA patterns to meet accessibility standards. The following ARIA attributes are used in the Spreadsheet component:
| Attributes | Purpose |
|---------------|-------------|
| `role=textbox` | Identifies an element as an input field that allows text entry.|
-| `role=button` | To represent the element that acts as a button in the component. |
+| `role=button` | Identifies an element that functions as a button. |
| `role=combobox` | Identifies a component that combines a text input with a popup listbox or tree. |
| `role=menu` | Defines a container for a collection of choices or commands presented in a contextual or dropdown format. |
-| `role=alert` | Designates an element that displays im portant, time-sensitive information. |
+| `role=alert` | Designates an element that displays important, time-sensitive information. |
| `aria-label`| This attribute describes the accessible name for the interactive elements. |
-| `aria-expanded` | This attribute describes the control (for example, dropdown) is expanded or collapsed. |
+| `aria-expanded` | Indicates whether a collapsible element (e.g., a dropdown) is currently expanded or collapsed. |
| `aria-live` | Defines a region as "live", meaning its content updates dynamically. Values include "off", "polite" (waits until idle), or "assertive" (announces immediately). |
-| `aria-rowindex` | Defines row index of the row with respect to the total number of rows within the Spreadsheet. |
-| `aria-colindex` | Defines the column index of the column with respect to the total number of columns within the Spreadsheet. |
+| `aria-rowindex` | Defines the row index of a row with respect to the total number of rows in the Spreadsheet. |
+| `aria-colindex` | Defines the column index of a column with respect to the total number of columns in the Spreadsheet. |
| `aria-multiline` | Indicates whether a textbox accepts multiple lines of input or only a single line. |
## Keyboard shortcuts
-The Syncfusion Blazor Spreadsheet followed keyboard interaction guidelines, making it accessible for people who use assistive technologies (AT) and those who completely rely on keyboard navigation. The following keyboard shortcuts are supported by the Spreadsheet.
+The Syncfusion Blazor Spreadsheet follows keyboard interaction guidelines, making it accessible for people who use assistive technologies (AT) and those who rely on keyboard navigation. The following keyboard shortcuts are supported by the Spreadsheet.
Clipboard
@@ -86,27 +82,27 @@ The Syncfusion Blazor Spreadsheet followed keyboard interaction guidelines, maki
|-----|----- | -----|
| Page Up / Page Down | Fn + ↑ / ↓ |Scrolls up or down one screen at a time.|
| Arrow keys | Arrow keys | Navigates between adjacent cells in the direction of the arrow key.|
-| Enter | Enter | Moves the selection to the cell below.|
-| Shift + Enter | ⇧ + Enter | Moves the selection to the cell above.|
-| Tab | Tab | Moves the selection to the cell on the right.|
-| Shift + Tab | ⇧ + Tab | Moves the selection to the cell on the left.|
+| Enter | Enter | Moves the active cell down one row.|
+| Shift + Enter | ⇧ + Enter | Moves the active cell up one row.|
+| Tab | Tab | Moves the active cell right one column.|
+| Shift + Tab | ⇧ + Tab | Moves the active cell left one column.|
Editing
| Windows | MAC | Actions |
|-----|----- | -----|
-| F2 | F2 | Begin typing in the selected cell.|
-| Enter | Enter | Finish typing in the current cell and move to the one below.|
-| Shift + Enter | ⇧ + Enter | Finish typing in the current cell and move to the one above.|
-| Tab | Tab | Finish typing in the current cell and move to the one on the right. |
-| Shift + Tab | ⇧ + Tab |Finish typing in the current cell and move to the one on the left.|
-| Escape | Esc | Cancel editing and return to the original value in the cell.|
+| F2 | F2 | Enters edit mode for the selected cell.|
+| Enter | Enter | Confirms the edit and moves the active cell down one row.|
+| Shift + Enter | ⇧ + Enter | Confirms the edit and moves the active cell up one row.|
+| Tab | Tab | Confirms the edit and moves the active cell right one column. |
+| Shift + Tab | ⇧ + Tab | Confirms the edit and moves the active cell left one column.|
+| Escape | Esc | Cancels the edit and restores the cell's original value.|
Clear
| Windows | MAC | Actions |
|-----|----- | -----|
-| Delete | Delete | Clear contents of the selected cells.|
+| Delete | Delete | Clears the contents of the selected cells.|
Hyperlink
diff --git a/Document-Processing/Excel/Spreadsheet/Blazor/cell-range.md b/Document-Processing/Excel/Spreadsheet/Blazor/cell-range.md
index fec807552..ae40c3c87 100644
--- a/Document-Processing/Excel/Spreadsheet/Blazor/cell-range.md
+++ b/Document-Processing/Excel/Spreadsheet/Blazor/cell-range.md
@@ -1,19 +1,18 @@
---
layout: post
-title: Managing Cell Ranges in Blazor Spreadsheet component | Syncfusion
-description: Checkout and learn to manage cell range features such as formatting, autofill, and clear options in the Syncfusion Blazor Spreadsheet component and more.
+title: Managing Cell Ranges in the Blazor Spreadsheet Component | Syncfusion
+description: Check out and learn to manage cell range features such as formatting, autofill, and clear options in the Syncfusion Blazor Spreadsheet component and more.
platform: document-processing
control: Spreadsheet
documentation: ug
---
# Managing Cell Ranges in Blazor Spreadsheet component
-
-A cell range refers to a group of selected cells in a Spreadsheet that can be manipulated or processed collectively.
+A cell range is a set of selected cells in a Spreadsheet, typically specified using A1 notation (for example, `A1:B10`). A range may be a single cell or a contiguous block of cells that can be manipulated or processed collectively.
## Cell formatting
-Cell formatting enhances the visual presentation of data in a Spreadsheet by applying styles such as font changes, colors, borders, and alignment to individual cells or cell ranges. This helps in organizing and emphasizing important information effectively.
+Cell formatting enhances the visual presentation of data by applying styles such as font changes, colors, borders, and alignment to individual cells or cell ranges. This helps organize content and emphasize important information for faster interpretation.
Cell formatting options include:
@@ -21,53 +20,53 @@ Cell formatting options include:
* **Italic** - Slants the text to give it a distinct look, often used for emphasis or to highlight differences.
-* **Underline** - Adds a line below the text, commonly used for emphasis or to indicate hyperlinks.
+* **Underline** - Adds a line below the text, commonly used for emphasis or to indicate hyperlinks.
-* **Strikethrough** - Draws a line through the text, often used to show completed tasks or outdated information.
+* **Strikethrough** - Draws a line through the text, often used to show completed tasks or outdated information.
-* **Font Family** - Changes the typeface of the text (e.g., Arial, Calibri, Times New Roman, and more) to enhance readability or visual appeal.
+* **Font Family** - Changes the typeface of the text (e.g., Arial, Calibri, Times New Roman, and more) to enhance readability or visual appeal.
-* **Font Size** - Adjusts the size of the text to create visual hierarchy or improve readability in the Spreadsheet.
+* **Font Size** - Adjusts the size of the text to create visual hierarchy or improve readability in the Spreadsheet.
-* **Font Color** - Changes the color of the text to improve visual hierarchy or to organize information using color codes.
+* **Font Color** - Changes the color of the text to improve visual hierarchy or to organize information using color codes.
-* **Fill Color** - Adds color to the cell background to visually organize data or highlight important information.
+* **Fill Color** - Adds color to the cell background to visually organize data or highlight important information.
-* **Horizontal Alignment** - Controls the position of text from left to right within a cell. Options include:
+* **Horizontal Alignment** - Controls the position of text from left to right within a cell. Options include:
* **Left** - Default for text
* **Center** - Useful for headings
* **Right** - Default for numbers
-* **Vertical Alignment** - Controls the position of text from top to bottom within a cell. Options include:
+* **Vertical Alignment** - Controls the position of text from top to bottom within a cell. Options include:
* **Top** – Aligns content to the top of the cell
* **Middle** – Centers content vertically
* **Bottom** – Default alignment
-* **Wrap Text** - Displays long content on multiple lines within a single cell, preventing it from overflowing into adjacent cells. To enable text wrapping:
- 1. Select the target cell or range (e.g., C5).
- 2. Go to the Home tab.
- 3. Click Wrap Text in the ribbon to toggle text wrapping for the selected cells.
+* **Wrap Text** - Displays long content on multiple lines within a single cell, preventing it from overflowing into adjacent cells. To enable text wrapping:
+ 1. Select the target cell or range (e.g., C5).
+ 2. Go to the Home tab.
+ 3. Click Wrap Text in the ribbon to toggle text wrapping for the selected cells.
-Cell formatting can be applied to or removed from a cell or range of cells by using the formatting options available in the Ribbon toolbar under the **Home** tab.
+Cell formatting can be applied or removed from a cell or range by using the options available in the component's built-in **Ribbon** under the **Home** tab.
## Autofill
-Autofill is used to fill cells with data based on adjacent cells. It follows patterns from adjacent cells when available, eliminating the need to enter repeated data manually. The [AllowAutofill](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.SfSpreadsheet.html#Syncfusion_Blazor_Spreadsheet_SfSpreadsheet_AllowAutofill) property can be used to enable or disable the autofill support.
+Autofill is used to fill cells with data that follows a pattern or is based on data in other cells. It helps avoid entering repetitive data manually. The [AllowAutofill](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.SfSpreadsheet.html#Syncfusion_Blazor_Spreadsheet_SfSpreadsheet_AllowAutofill) property can be used to enable or disable this feature.
-> * The default value of the `AllowAutofill` property is **true**.
+* The default value of the `AllowAutofill` property is **true**.
Autofill can be performed in one of the following ways:
-* Drag and drop the cell using the fill handle element.
-* Use the [AutofillAsync()](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.SfSpreadsheet.html#Syncfusion_Blazor_Spreadsheet_SfSpreadsheet_AutofillAsync_System_String_System_String_) method programmatically.
+* Drag and drop the cell using the fill handle element.
+* Use the [AutofillAsync()](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.SfSpreadsheet.html#Syncfusion_Blazor_Spreadsheet_SfSpreadsheet_AutofillAsync_System_String_System_String_) method programmatically.
-The available parameters in the `AutofillAsync()` method are:
+The `AutofillAsync()` method accepts string parameters in A1 notation for `fillRange` and `dataRange`. The available parameters are:
| Parameter | Type | Description |
| -- | -- | -- |
-| fillRange | string | Specifies the fill range. |
-| dataRange | string | Specifies the data range. |
-| direction | string | Specifies the direction ("Up", "Right", "Down", and "Left") to be filled. |
+| fillRange | string | Specifies the fill range in A1 notation (e.g., "A1:A5"). |
+| dataRange | string | Specifies the source data range in A1 notation (e.g., "B1:B5"). |
+| direction | string | Specifies the direction to be filled ("Up", "Right", "Down", or "Left"). |
### Implementing autofill programmatically
@@ -105,22 +104,128 @@ The following illustration demonstrates the use of autofill in the Spreadsheet c

+## Events
+
+The Blazor Spreadsheet provides events that are triggered during autofill operations, such as [AutofillActionBegin](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.AutofillActionBeginEventArgs.html) and [AutofillActionEnd](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.AutofillActionEndEventArgs.html). These events enable the execution of custom actions before and after an autofill operation, allowing for validation, customization, and response handling.
+
+### AutofillActionBegin
+
+The `AutofillActionBegin` event is triggered before an autofill operation is performed. This event provides an opportunity to validate the autofill operation and apply restrictions based on custom logic, such as preventing the operation under specific conditions.
+
+**Purpose**
+
+This event is useful for scenarios where autofill behavior needs to be controlled dynamically—such as restricting autofill in specific ranges or preventing autofill based on certain conditions.
+
+**Event Arguments**
+
+The event uses the [AutofillActionBeginEventArgs](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.AutofillActionBeginEventArgs.html) class, which includes the following properties:
+
+| Event Arguments | Description |
+|----------------|-------------|
+| FillRange (read-only) | The address of the target range for the autofill operation (e.g., "Sheet1!A2:A5"). |
+| DataRange (read-only) | The source data range for the autofill operation (e.g., "Sheet1!A1:A1"). |
+| Direction (read-only) | The direction of the autofill operation ("Down", "Right", "Up", or "Left"). |
+| Cancel | A boolean value to cancel the autofill operation. |
+
+{% tabs %}
+{% highlight razor tabtitle="Index.razor" %}
+
+@using Syncfusion.Blazor.Spreadsheet
+
+
+
+
+
+@code {
+ public byte[] DataSourceBytes { get; set; }
+
+ protected override void OnInitialized()
+ {
+ string filePath = "wwwroot/Sample.xlsx";
+ DataSourceBytes = File.ReadAllBytes(filePath);
+ }
+
+ public void OnAutofillActionBegin(AutofillActionBeginEventArgs args)
+ {
+ // Prevent autofill for a specific range.
+ if (args.FillRange == "A1:A10")
+ {
+ args.Cancel = true;
+ }
+
+ // Prevent autofill when dragging upward.
+ if (args.Direction == "Up")
+ {
+ args.Cancel = true;
+ }
+ }
+}
+
+{% endhighlight %}
+{% endtabs %}
+
+**AutofillActionEnd**
+
+The `AutofillActionEnd` event is triggered after an autofill operation has been successfully completed. This event provides detailed information about the completed autofill action, enabling further processing or logging if required.
+
+**Purpose**
+
+This event is useful for scenarios where post-autofill actions are needed, such as logging the autofill operation, updating related data, or triggering additional UI updates.
+
+**Event Arguments**
+
+The event uses the [AutofillActionEndEventArgs](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.AutofillActionEndEventArgs.html) class, which includes the following properties:
+
+| Event Arguments | Description |
+|----------------|-------------|
+| FillRange (read-only) | The address of the target range where the autofill was applied (e.g., "Sheet1!A2:A5"). |
+| DataRange (read-only) | The source data range used for the autofill operation (e.g., "Sheet1!A1:A1"). |
+| Direction (read-only) | The direction of the autofill operation ("Down", "Right", "Up", or "Left"). |
+
+{% tabs %}
+{% highlight razor tabtitle="Index.razor" %}
+
+@using Syncfusion.Blazor.Spreadsheet
+
+
+
+
+
+@code {
+ public byte[] DataSourceBytes { get; set; }
+
+ protected override void OnInitialized()
+ {
+ string filePath = "wwwroot/Sample.xlsx";
+ DataSourceBytes = File.ReadAllBytes(filePath);
+ }
+
+ public void OnAutofillActionEnd(AutofillActionEndEventArgs args)
+ {
+ // Log or process the completed autofill operation.
+ Console.WriteLine($"Autofill completed for range: {args.FillRange}");
+ }
+}
+
+{% endhighlight %}
+{% endtabs %}
+
## Clear
-Clear support helps clear the cell contents (formulas and data) and formats (including number formats) in a Spreadsheet. When **Clear All** is applied, both the contents and the formats will be cleared simultaneously.
+The clear functionality helps remove cell contents (formulas and data), formats (including number formats), and hyperlinks from a selected range.
### Applying the clear functionality
The clear support can be applied using the following way:
-* Select the **Clear** icon in the Ribbon toolbar under the **Home** tab.
+You can apply the clear functionality by selecting the **Clear** icon in the **Ribbon** under the **Home** tab.
-| Options | Uses |
+| Option | Use |
| -- | -- |
-| **Clear All** | Used to clear all contents, formats, and hyperlinks. |
-| **Clear Formats** | Used to clear the formats (including number formats) in a cell. |
-| **Clear Contents** | Used to clear the contents (formulas and data) in a cell. |
-| **Clear Hyperlinks** | Used to clear the hyperlink in a cell. |
+| **Clear All** | Clears all contents, formats, and hyperlinks. |
+| **Clear Formats** | Clears only the formatting from the selected cells. |
+| **Clear Contents** | Clears only the contents (formulas and data) from the selected cells. |
+| **Clear Hyperlinks** | Clears only the hyperlinks from the selected cells. |
The following image displays the clear options available in the Ribbon toolbar under the **Home** tab of the Blazor Spreadsheet.
diff --git a/Document-Processing/Excel/Spreadsheet/Blazor/clipboard.md b/Document-Processing/Excel/Spreadsheet/Blazor/clipboard.md
index 3a400bc99..081bbaefc 100644
--- a/Document-Processing/Excel/Spreadsheet/Blazor/clipboard.md
+++ b/Document-Processing/Excel/Spreadsheet/Blazor/clipboard.md
@@ -1,19 +1,18 @@
---
layout: post
title: Clipboard in Blazor Spreadsheet component | Syncfusion
-description: Checkout and learn here all about the clipboard functionalities in the Syncfusion Blazor Spreadsheet component and more.
-platform: document-processing
+description: Explore the clipboard functionalities in the Syncfusion Blazor Spreadsheet component, including cut, copy, and paste operations via UI and programmatic methods.
control: Spreadsheet
documentation: ug
---
# Clipboard in Blazor Spreadsheet component
-The Spreadsheet supports clipboard operations such as **Cut**, **Copy**, and **Paste**. These operations can be enabled or disabled using the [EnableClipboard](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.SfSpreadsheet.html#Syncfusion_Blazor_Spreadsheet_SfSpreadsheet_EnableClipboard) property of the Spreadsheet component. By default, the `EnableClipboard` property is set to **true**.
+The Spreadsheet component supports clipboard operations such as **Cut**, **Copy**, and **Paste**. These operations can be managed using the [EnableClipboard](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.SfSpreadsheet.html#Syncfusion_Blazor_Spreadsheet_SfSpreadsheet_EnableClipboard) property, which is set to **true** by default.
The keyboard shortcuts are available to perform clipboard operations efficiently within the Spreadsheet component. `Ctrl+C` copies the selected cells, `Ctrl+X` cuts the selected cells, and `Ctrl+V` pastes the content from the clipboard.
-When `EnableClipboard` is set to **false**, the **Cut** and **Copy** options are removed from the user interface (Ribbon and Context Menu). In addition, shortcut keys (**Ctrl+C, Ctrl+X, Ctrl+V**) and API methods will not work. If the worksheet is protected, clipboard operations such as cut and paste are also disabled. For more information on worksheet protection, refer [here](./protection#protect-sheet).
+When `EnableClipboard` is set to **false**, the **Cut** and **Copy** options are removed from the Ribbon and Context Menu. Additionally, shortcut keys and API methods for clipboard operations are disabled. If a worksheet is protected, cut and paste operations are also disabled. For more details on worksheet protection, refer to the [Worksheet Protection](./protection#protect-sheet) topic.
## Cut
@@ -25,14 +24,14 @@ The **Cut** operation can be performed through the user interface (UI) using any
**Using the Ribbon**
-- Select a cell or range of cells to cut the content.
-- Click the **Cut** button in the **Home** tab of the **Ribbon** toolbar. This action removes the selected cell or range of cells and places the content on the clipboard.
+- Select the cell or range of cells to cut.
+- Click the **Cut** button in the **Home** tab of the **Ribbon**. This action cuts the selected content and places it on the clipboard.

**Using the Context Menu**
-- Select a cell or range of cells to cut the content.
+- Select the cell or range of cells to cut the content.
- Right-click on the selected cell or range of cells.
- Choose the **Cut** option from the context menu.
@@ -42,7 +41,7 @@ The **Cut** operation can be performed through the user interface (UI) using any
The [CutCellAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.SfSpreadsheet.html#Syncfusion_Blazor_Spreadsheet_SfSpreadsheet_CutCellAsync_System_String_) method allows performing cut operations within any sheet. This method copies the specified cell or range and its properties (including value, format, style, etc.) to the clipboard and removes it from the sheet. It supports multiple scenarios for cutting cells or ranges. Below are the details for each scenario, including code examples and parameter information.
-> The **Cut** operation will not execute if invalid or out-of-boundary cell ranges are specified. All cell references must fall within the defined worksheet boundaries to ensure successful execution of the operation.
+> The **Cut** operation will not execute if an invalid or out-of-bounds cell range is specified. All cell references must be within the defined worksheet boundaries to ensure successful execution of the operation.
**Cut active range**
@@ -182,12 +181,12 @@ The **Copy** operation duplicates data from a selected range of cells, rows, or
### Copy operations via UI
-The copy operation can be performed through the user interface (UI) using any of the following methods:
+The copy operation can be performed through the UI using one of the following methods:
**Using the Ribbon**
- Select the cell or range of cells to copy.
-- Click the **Copy** button in the **Home** tab of the **Ribbon** toolbar. This action duplicates the selected cell or range of cells and places the content on the clipboard.
+- Click the **Copy** button in the **Home** tab of the **Ribbon**. This action duplicates the selected cell or range of cells and places the content on the clipboard.

@@ -203,7 +202,7 @@ The copy operation can be performed through the user interface (UI) using any of
The [CopyCellAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.SfSpreadsheet.html#Syncfusion_Blazor_Spreadsheet_SfSpreadsheet_CopyCellAsync_System_String_) method enables performing copy operations within any sheet. This method copies the specified cell or range of cells along with its properties (including value, format, style, etc.) to the clipboard. It supports multiple scenarios for copying cells or ranges. Below are the details for each scenario, including code examples and parameter information.
-> The **Copy** operation will not execute if invalid or out-of-boundary cell ranges are specified. All cell addresses must fall within the valid boundaries of the worksheet to ensure successful execution of the operation.
+> The **Copy** operation will not execute if an invalid or out-of-bounds cell range is specified. All cell references must be within the defined worksheet boundaries to ensure successful execution of the operation.
**Copy active range**
@@ -274,13 +273,13 @@ The available parameters in the `CopyCellAsync` method are:
public async Task CopyCell()
{
- // The specified cell is copied from the active worksheet.
+ // Copies the specified cell from the active worksheet.
await SpreadsheetInstance.CopyCellAsync("A2");
}
public async Task CopyRange()
{
- // A specified range of cells is copied from the active worksheet.
+ // Copies a specified range of cells from the active worksheet.
await SpreadsheetInstance.CopyCellAsync("A1:D10");
}
}
@@ -328,7 +327,7 @@ The available parameters in the `CopyCellAsync` method are:
public async Task CopyRangeFromSpecificSheet()
{
- // A specified range of cells is copied from the designated worksheet.
+ // Copies a specified range of cells from the designated worksheet.
await SpreadsheetInstance.CopyCellAsync("Sheet2!B3:E8");
}
}
@@ -340,18 +339,18 @@ The available parameters in the `CopyCellAsync` method are:
The paste operation inserts data from the clipboard into a selected range of cells, rows, or columns, retaining all relevant details such as values, formats, and styles. When performing a **Cut** followed by **Paste**, the clipboard is cleared after the data is transferred. In contrast, with a **Copy** followed by **Paste**, the clipboard contents remain available for reuse.
-**External clipboard** support is provided, allowing content to be pasted not only from within the spreadsheet but also from external sources such as Google Sheets, Microsoft Excel, Word documents, plain text files, and web pages.
+**External clipboard** support allows pasting content from external sources like Google Sheets, Microsoft Excel, text files, and web pages.
### Paste operations via UI
-The paste operation can be performed through the user interface (UI) using any of the following methods:
+The paste operation can be performed through the UI using one of the following methods:
**Using the Ribbon**
- A cell must be selected or a range of cells highlighted before initiating the paste operation.
- The **Paste** button located in the **Home** tab of the **Ribbon** toolbar must be clicked to perform the paste action.
- The values previously cut or copied from the clipboard will be inserted into the selected range.
-- If the clipboard does not contain any values, the **Paste** option will remain disabled.
+- The **Paste** option is disabled if the clipboard is empty.

@@ -360,25 +359,25 @@ The paste operation can be performed through the user interface (UI) using any o
- A cell must be clicked or a range of cells selected before initiating the paste operation.
- The **Paste** option must be selected from the context menu accessed via right-click.
- The values previously cut or copied from the clipboard will be inserted into the selected range.
-- If the clipboard does not contain any values, the **Paste** option will remain disabled.
+- The **Paste** option is disabled if the clipboard is empty.

### Paste operations programmatically
-The [PasteCellAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.SfSpreadsheet.html#Syncfusion_Blazor_Spreadsheet_SfSpreadsheet_PasteCellAsync_System_String_) method pastes the clipboard content into a specified cell or range of cells and preserves all associated properties (including value, format, style, etc.). When the source range is larger than the specified target range, all data from the source will still be pasted. The paste operation automatically extends beyond the defined target boundaries and overrides the content in the expanded area to match the full dimensions of the source.
+The [PasteCellAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.SfSpreadsheet.html#Syncfusion_Blazor_Spreadsheet_SfSpreadsheet_PasteCellAsync_System_String_) method pastes clipboard content into a specified cell or range, preserving all properties (value, format, style, etc.). If the source range is larger than the target range, the paste operation extends beyond the target's boundaries to accommodate the full source content, overwriting any data in the expanded area.
**Example**
- Source Range: **"Sheet1!A1:C3"** (3 rows × 3 columns)
- Target Range: **"Sheet2!B2"** (single cell)
-In this case, although only a single cell is selected as the target, the paste operation overrides the range **"Sheet2!B2:D4"** to match the full 3×3 source content.
+Pasting this content will overwrite the range **"Sheet2!B2:D4"** to match the 3×3 source content.
> The **Paste** operation will not be executed if invalid or out-of-boundary cell ranges are specified. All cell addresses must fall within the valid boundaries of the worksheet to ensure successful execution of the paste action.
**Paste to active range**
-When the `PasteCellAsync` method is invoked without any parameters, the content is automatically pasted into the last selected range, provided an active selection exists. If no range is selected, the content is pasted into the active cell.
+When `PasteCellAsync` is invoked without parameters, the content is pasted into the last selected range. If no range is selected, the content is pasted into the active cell.
{% tabs %}
{% highlight razor %}
@@ -403,7 +402,7 @@ When the `PasteCellAsync` method is invoked without any parameters, the content
public async Task PasteActiveCell()
{
- // The content is pasted into the currently active cell or range.
+ // Pastes the content into the currently active cell or range.
await SpreadsheetInstance.PasteCellAsync();
}
}
@@ -413,7 +412,7 @@ When the `PasteCellAsync` method is invoked without any parameters, the content
**Paste to specific range in active sheet**
-To paste content into specific range in the current active sheet, provide the target cell address as a parameter to the `PasteCellAsync` method. A valid cell selection must exist prior to executing the paste operation. Either a single cell or a range of cells can be specified as the destination.
+To paste content into a specific range in the active sheet, provide the target cell address or range as a parameter to the `PasteCellAsync` method. A valid cell selection must exist prior to executing the paste operation. Either a single cell or a range of cells can be specified as the destination.
The available parameters in the `PasteCellAsync` method are:
@@ -446,13 +445,13 @@ The available parameters in the `PasteCellAsync` method are:
public async Task PasteCell()
{
- // The clipboard content is pasted into the specified cell.
+ // Pastes the clipboard content into the specified cell.
await SpreadsheetInstance.PasteCellAsync("A2");
}
public async Task PasteRange()
{
- // The clipboard content is pasted into the specified range of cells.
+ // Pastes the clipboard content into the specified range of cells.
await SpreadsheetInstance.PasteCellAsync("A2:B5");
}
@@ -503,7 +502,7 @@ The available parameters in the `PasteCellAsync` method are:
public async Task PasteCellToTargetSheet()
{
- // The cell address, including the sheet name, is used as the paste destination
+ // The cell address, including the sheet name, is used as the paste destination.
await SpreadsheetInstance.PasteCellAsync("Sheet1!B2");
}
}
@@ -513,7 +512,7 @@ The available parameters in the `PasteCellAsync` method are:
## Events
-The Blazor Spreadsheet provides events that are triggered during the clipboard action such as [CutCopyActionBegin](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.CutCopyActionBeginEventArgs.html) and [Pasting](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.PastingEventArgs.html). These events can be used to perform any custom actions before the clipboard action starts or interacted with, allowing for validation, customization, and response handling.
+The Blazor Spreadsheet provides events that trigger during clipboard actions: [CutCopyActionBegin](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.CutCopyActionBeginEventArgs.html) and [Pasting](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.PastingEventArgs.html). These events allow for validation, customization, and other custom actions before the clipboard operation is executed.
* **CutCopyActionBegin** - `CutCopyActionBegin` event is triggered before a cut or copy operation is initiated.
* **Pasting** - `Pasting` event is triggered prior to the initiation of a paste operation.
@@ -524,11 +523,11 @@ The `CutCopyActionBegin` event is triggered before a copy or cut operation is pe
**Purpose**
-This event addresses scenarios that require monitoring or restriction of clipboard operations, such as preventing sensitive data from being copied, logging clipboard activities for audit and compliance purposes, enforcing custom validation rules for designated cells or ranges, and restricting cut operations while allowing copy functionality.
+This event is useful for monitoring clipboard activities, preventing sensitive data from being copied, validating operations, or selectively restricting cut and copy actions based on custom logic.
**Event Arguments**
-The `CutCopyActionBeginEventArgs` includes the following properties:
+`CutCopyActionBeginEventArgs` includes the following properties:
| Event Arguments | Description |
|----------------|-------------|
@@ -556,7 +555,7 @@ The `CutCopyActionBeginEventArgs` includes the following properties:
public void OnCutCopyActionBegin(CutCopyActionBeginEventArgs args)
{
- // Cancels the cut or copy operation.
+ // Cancels any cut or copy operation.
args.Cancel = true;
}
}
@@ -574,7 +573,7 @@ This event is applicable in scenarios that require control over paste operations
**Event Arguments**
-The `PastingEventArgs` includes the following properties:
+`PastingEventArgs` includes the following properties:
| Event Arguments | Description |
|----------------|-------------|
diff --git a/Document-Processing/Excel/Spreadsheet/Blazor/contextmenu.md b/Document-Processing/Excel/Spreadsheet/Blazor/contextmenu.md
index 56d98eb6a..9d49f4ca7 100644
--- a/Document-Processing/Excel/Spreadsheet/Blazor/contextmenu.md
+++ b/Document-Processing/Excel/Spreadsheet/Blazor/contextmenu.md
@@ -1,8 +1,7 @@
---
layout: post
title: Context Menu in Blazor Spreadsheet component | Syncfusion
-description: Checkout and learn here about the context menu functionality in the Syncfusion Blazor Spreadsheet component and more.
-platform: document-processing
+description: Explore the context menu functionality in the Syncfusion Blazor Spreadsheet component, including options for cells, rows, columns, and sheet tabs.
control: Spreadsheet
documentation: ug
---
@@ -13,7 +12,8 @@ The context menu enhances interaction with the Syncfusion Blazor Spreadsheet com
N> When the `EnableContextMenu` property is set to **false**, the context menu does not appear upon right-clicking any element in the component.
-## Context menu options categorized by element
+
+## Context Menu Options Based on Spreadsheet Element Type
The context menu options are dynamically adjusted based on the specific element in the Spreadsheet that is right-clicked. Each element displays context-specific functionality relevant to its type.
@@ -65,8 +65,8 @@ When right-clicking a single column header or a range of selected column headers
| Cut | Removes data from the selected columns and temporarily stores it on the clipboard for reuse within the Spreadsheet or in an external application. |
| Copy | Copies data from the selected columns and temporarily stores it on the clipboard for reuse within the Spreadsheet or in an external application. |
| Paste | Inserts data from the clipboard into the Spreadsheet at the current selection. |
-| Insert columns to the left | Adds new columns to the left of the selected columns. The number of columns inserted matches the number of columns selected. |
-| Insert columns to the right | Adds new columns to the right of the selected columns. The number of columns inserted matches the number of columns selected. |
+| Insert column to the left | Adds a new column to the left of the selected column. The number of columns inserted matches the number of columns selected. |
+| Insert column to the right | Adds a new column to the right of the selected column. The number of columns inserted matches the number of columns selected. |

@@ -91,7 +91,7 @@ When right-clicking on a sheet tab located at the bottom of the Spreadsheet, the

-Sheet tab context menu behavior is controlled by workbook-level protection. In protected workbook, only the **Protect Sheet** or **Unprotect Sheet** option remains active. All other options like **Insert**, **Delete**, **Rename**, **Move Right**, **Move Left**, **Hide**, and **Duplicate** are disabled to preserve workbook structure.
+Sheet tab context menu behavior is controlled by workbook-level protection. In a protected workbook, only the **Protect Sheet** or **Unprotect Sheet** option remains active. All other options like **Insert**, **Delete**, **Rename**, **Move Right**, **Move Left**, **Hide**, and **Duplicate** are disabled to preserve workbook structure.
## Properties that influence context menu options
@@ -126,4 +126,4 @@ These properties control specific context menu functionality:
}
{% endhighlight %}
-{% endtabs %}
\ No newline at end of file
+{% endtabs %}
diff --git a/Document-Processing/Excel/Spreadsheet/Blazor/editing.md b/Document-Processing/Excel/Spreadsheet/Blazor/editing.md
index 3f723ab6f..1c7f60269 100644
--- a/Document-Processing/Excel/Spreadsheet/Blazor/editing.md
+++ b/Document-Processing/Excel/Spreadsheet/Blazor/editing.md
@@ -1,6 +1,6 @@
---
layout: post
-title: Cell Editing in the Blazor Spreadsheet component | Syncfusion
+title: Cell Editing in Blazor Spreadsheet component | Syncfusion
description: Checkout and learn here about the cell editing features in the Syncfusion Blazor Spreadsheet component and more.
platform: document-processing
control: Spreadsheet
@@ -9,7 +9,7 @@ documentation: ug
# Cell editing in the Blazor Spreadsheet component
-Cell editing in the Blazor Spreadsheet component enables modification of cell content either directly within the spreadsheet or through the formula bar. This feature is enabled by default and can be controlled using the [AllowEditing](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.SfSpreadsheet.html#Syncfusion_Blazor_Spreadsheet_SfSpreadsheet_AllowEditing) property. To disable or enable cell editing, set the value of this property accordingly.
+Cell editing in the Blazor Spreadsheet component enables modification of cell content either directly within the spreadsheet or through the formula bar. This feature is enabled by default but can be disabled by setting the [AllowEditing](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.SfSpreadsheet.html#Syncfusion_Blazor_Spreadsheet_SfSpreadsheet_AllowEditing) property. To disable or enable cell editing, set the value of this property accordingly.
## Edit cell
@@ -20,7 +20,7 @@ Cell editing can be initiated directly through the UI using any of the following
- Use the **formula bar** to modify the cell's contents.
- Press **BACKSPACE** or **SPACE** to clear the cell and begin editing.
-> For additional keyboard shortcuts related to cell editing, refer [here](./accessibility#keyboard-shortcuts).
+> For additional keyboard shortcuts related to cell editing, refer to the [Keyboard Shortcuts](./accessibility#keyboard-shortcuts) documentation.
## Update cell
@@ -44,7 +44,7 @@ If a cell address is incorrectly formatted, refers to a non-existent sheet, or l
{% highlight razor %}
@using Syncfusion.Blazor.Spreadsheet
-
+@inject HttpClient Http
@@ -82,12 +82,12 @@ If a cell address is incorrectly formatted, refers to a non-existent sheet, or l
To exit edit mode without saving changes, press the **ESCAPE** key. This action restores the original content of the cell and cancels any modifications made during editing.
-
+
## Cell editing in protected sheet
-In a protected sheet, only the unlocked ranges can be edited based on the sheet's protection settings. Attempting to modify a locked range triggers an error message, as shown below:
+In a protected sheet, only unlocked ranges can be edited based on the sheet's protection settings. Attempting to modify a locked range triggers an error message, as shown below:
-
+
-N> For more information on worksheet protection, refer [here](./protection).
+N> For more information on worksheet protection, refer to the [Worksheet Protection](./protection) documentation.
diff --git a/Document-Processing/Excel/Spreadsheet/Blazor/filtering.md b/Document-Processing/Excel/Spreadsheet/Blazor/filtering.md
index 2af1c5816..b5a56d469 100644
--- a/Document-Processing/Excel/Spreadsheet/Blazor/filtering.md
+++ b/Document-Processing/Excel/Spreadsheet/Blazor/filtering.md
@@ -11,7 +11,7 @@ documentation: ug
Filtering in the Blazor Spreadsheet component enables focused data analysis by displaying only the rows that meet specific criteria. This functionality helps create interactive views by hiding rows that do not match the filtering conditions. Filtering behavior is controlled using the [AllowFiltering](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.SfSpreadsheet.html#Syncfusion_Blazor_Spreadsheet_SfSpreadsheet_AllowFiltering) property, which is set to **true** by default.
-N> When `AllowFiltering` is set to **false**, filtering options are disabled in the ribbon and removed from the context menu. API methods related to filtering will also be inactive. Additionally, if the worksheet is protected, the filtering feature is disabled. For more information on worksheet protection, refer [here](./protection#protect-sheet).
+N> When `AllowFiltering` is set to **false**, filtering options are disabled in the ribbon and removed from the context menu. API methods related to filtering will also be inactive. Additionally, if the worksheet is protected, the filtering feature is disabled. For more information, refer to the [Worksheet Protection](./protection#protect-sheet) documentation.
Filtering can be accessed through the user interface using the following method:
@@ -31,7 +31,7 @@ The filter dialog appears when clicking on a column's filter icon and provides t
* **Sort options** - Provides commands for sorting data in **Ascending** or **Descending** order.
* **Clear filter** - Removes any filtering applied to the selected column.
-* **Data type-specific filters** - Displays sub menus tailored to the column's content type, such as **Text Filters**, **Number Filters**, or **Date Filters**.
+* **Data type-specific filters** - Displays submenu tailored to the column's content type, such as **Text Filters**, **Number Filters**, or **Date Filters**.
* **Search box** - Enables quick lookup of values within the filter list.
* **Select All** checkbox - Toggles the selection of all available values in the column.
* **Value** checkboxes - Lists individual checkboxes for each unique value found in the column.
@@ -66,13 +66,13 @@ Number filters provide specialized filtering options for columns containing nume
| Operator | Description |
| -- | -- |
-| Equal | Displays rows where the cell value exactly match the specified number. |
+| Equal | Displays rows where the cell value exactly matches the specified number. |
| Not Equal | Displays rows where the cell value does not match the specified number. |
| Less Than | Displays rows where the cell value is less than the specified number. |
| Less Than Or Equal | Displays rows where the cell value is less than or equal to the specified number. |
| Greater Than | Displays rows where the cell value is greater than the specified number. |
-| Greater Than Or Equal | Displays rows where the cell value falls within a specified numeric range. |
-| Between | Displays rows with cell values that include the specified text. |
+| Greater Than Or Equal | Displays rows where the cell value is greater than or equal to the specified number. |
+| Between | Displays rows where the cell value falls within a specified numeric range. |
| Custom Filter | Opens a dialog for defining advanced numeric filter conditions. This dialog allows the combination of multiple criteria using logical operators such as **AND** and **OR**. Each condition can be configured using numeric comparison operators and custom values, enabling flexible and targeted filtering of numerical data. |

@@ -83,10 +83,10 @@ The date filters provide specialized filtering options for columns containing da
| Operator | Description |
| -- | -- |
-| Equal | Displays rows where the cell value exactly match the specified value. |
-| Not Equal | Displays rows where the cell value does not match the specified value. |
-| Less Than | Displays rows where the date is earlier than the specified value. |
-| Greater Than | Displays rows where the date is later than the specified value. |
+| Equal | Displays rows where the cell value exactly matches the specified date. |
+| Not Equal | Displays rows where the cell value does not match the specified date. |
+| Less Than | Displays rows where the date is earlier than the specified date. |
+| Greater Than | Displays rows where the date is later than the specified date. |
| Between | Displays rows where the date falls within a defined date range. |
| This Month | Filters rows where the date falls within the current calendar month. |
| Last Month | Filters rows where the date falls within the previous calendar month. |
@@ -353,11 +353,11 @@ The [ClearAllFiltersAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blaz
## Reapply filter
-The reapply filter updates filtered results after changes are made to the data. It preserves the existing filter conditions and refreshes the view to reflect the most current data accurately.
+Reapplying filters updates the filtered results after changes are made to the data. It preserves the existing filter conditions and refreshes the view to reflect the most current data accurately.
For instance, if a filter is applied to display only rows where the **Status** column is set to **Approved**, and a new row is added with **Approved** as its value, the new row will not immediately appear. Using **Reapply Filter** recalculates the filter and ensures the new row is included in the filtered results.
-### Reapply filter via UI
+### Reapply filters via UI
Filters can be reapplied using the interface through the following methods:
@@ -378,9 +378,9 @@ Filters can be reapplied using the interface through the following methods:

-### Reapply filter programmatically
+### Reapply filters programmatically
-The [ReapplyFilterAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.SfSpreadsheet.html#Syncfusion_Blazor_Spreadsheet_SfSpreadsheet_ReapplyFiltersAsync) method refreshes all active filters to match updated worksheet data. This method is especially beneficial when rows are modified, inserted, or imported.
+The [ReapplyFiltersAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.SfSpreadsheet.html#Syncfusion_Blazor_Spreadsheet_SfSpreadsheet_ReapplyFiltersAsync) method refreshes all active filters to match updated worksheet data. This method is especially beneficial when rows are modified, inserted, or imported.
{% tabs %}
{% highlight razor tabtitle="Index.razor" %}
@@ -426,4 +426,4 @@ When applying filters in the Blazor Spreadsheet, validation messages are display
- **Multiple selection range validation** - If multiple ranges are selected for filtering, the selection is considered invalid. A **Multiple selection range** alert message is shown to highlight this limitation.
-
\ No newline at end of file
+
diff --git a/Document-Processing/Excel/Spreadsheet/Blazor/formulas.md b/Document-Processing/Excel/Spreadsheet/Blazor/formulas.md
index 19a4aedbe..ef9ac44f6 100644
--- a/Document-Processing/Excel/Spreadsheet/Blazor/formulas.md
+++ b/Document-Processing/Excel/Spreadsheet/Blazor/formulas.md
@@ -7,7 +7,7 @@ control: Spreadsheet
documentation: ug
---
-# Formulas in Blazor Spreadsheet component
+# Formulas in Blazor Spreadsheet Component
**Formulas** enable calculations within a worksheet by referencing cells from either the same worksheet or other worksheets in the workbook.
@@ -19,25 +19,25 @@ The **Formula Bar** simplifies editing or entering cell data. The [ShowFormulaBa
Formulas in the Syncfusion Blazor Spreadsheet can be accessed and inserted using the following methods:
-* Select **Insert Function** from the **Formulas** tab in the Ribbon toolbar. In the **Insert Function** dialog, choose a category, then select the desired function to insert it into the selected cell.
+* Select **Insert Function** from the **Formulas** tab in the Ribbon toolbar. In the **Insert Function** dialog, choose a category, then select the desired function to insert it into the selected cell.
-
+ 
-* Type **(=)** in a cell or the **Formula Bar** to display a list of available functions. Select a function from the list to insert it into the cell.
+* Type **(=)** in a cell or the **Formula Bar** to display a list of available functions. Select a function from the list to insert it into the cell.
-
+ 
-* Click the **Insert Function** button next to the **Formula Bar** to open the **Insert Function** dialog, which provides the same categorized function list and insertion options as the Ribbon toolbar.
+* Click the **Insert Function** button next to the **Formula Bar** to open the **Insert Function** dialog, which provides the same categorized function list and insertion options as the Ribbon toolbar.
-
+ 
## Calculation Mode
The Spreadsheet includes **Calculation Option** functionality, similar to Excel's calculation settings, which controls when and how formulas are recalculated. The available modes are:
-* **Automatic**: Formulas recalculate instantly when any dependent cell changes.
+* **Automatic**: Formulas recalculate instantly when any dependent cell changes.
-* **Manual**: Formulas recalculate only when explicitly triggered using the **Calculate Sheet** or **Calculate Workbook** options.
+* **Manual**: Formulas recalculate only when explicitly triggered using the **Calculate Sheet** or **Calculate Workbook** options.
### Automatic
@@ -61,7 +61,7 @@ If cell **C1** contains the formula **=A1 + B1**, and the value in **A1** or **B
## Named Ranges
-The **Named Ranges** support allows to assign a meaningful name to a specific cell or range of cells. This simplifies referencing and managing data within the Spreadsheet. Named Ranges can also be used in formulas, making them easier to read, understand, and maintain.
+The **Named Ranges** support allows you to assign a meaningful name to a specific cell or range of cells. This simplifies referencing and managing data within the Spreadsheet. Named Ranges can also be used in formulas, making them easier to read, understand, and maintain.
N> Named Ranges can be defined only for cells or ranges that contain values.
@@ -69,11 +69,11 @@ N> Named Ranges can be defined only for cells or ranges that contain values.
**Named Ranges** can be created using the following methods:
-* Select the desired range of cells and enter a name in the **Name Box**.
+* Select the desired range of cells and enter a name in the **Name Box**.
-* Select the range of cells, then click the **Name Manager** button in the Ribbon toolbar under the **Formulas** tab.
+* Select the range of cells, then click the **Name Manager** button in the Ribbon toolbar under the **Formulas** tab.
-
+ 
### Editing or Deleting Named Ranges
@@ -81,23 +81,23 @@ N> Named Ranges can be defined only for cells or ranges that contain values.
To edit a Named Range:
-* Open the **Name Manager** dialog.
+* Open the **Name Manager** dialog.
-* Select the Named Range to be edited.
+* Select the Named Range to be edited.
-* Click the **Edit** icon.
+* Click the **Edit** icon.
-* Modify the name, range, or scope as needed.
+* Modify the name, range, or scope as needed.
* Click the **Update Range** button, then click **OK** button to save changes.
To delete a Named Range:
-* Open the **Name Manager** dialog.
+1. Open the **Name Manager** dialog.
-* Select the Named Range to be deleted.
+2. Select the Named Range to be deleted.
-* Click the **Delete** icon, then click **OK** button to confirm.
+3. Click the **Delete** icon, then click the **OK** button to confirm.
N> Deleting a Named Range used in formulas may cause formula errors. Ensure the Named Range is not referenced before deleting it.
diff --git a/Document-Processing/Excel/Spreadsheet/Blazor/getting-started-webapp.md b/Document-Processing/Excel/Spreadsheet/Blazor/getting-started-webapp.md
index 9c7bb78b5..b381c859a 100644
--- a/Document-Processing/Excel/Spreadsheet/Blazor/getting-started-webapp.md
+++ b/Document-Processing/Excel/Spreadsheet/Blazor/getting-started-webapp.md
@@ -1,15 +1,15 @@
---
layout: post
-title: Getting started with Syncfusion Spreadsheet in Blazor Web App
+title: Getting Started with Blazor Spreadsheet Component | Syncfusion
description: Check out the documentation for getting started with Syncfusion Blazor Spreadsheet Component in Blazor Web App.
platform: document-processing
control: Spreadsheet
documentation: ug
---
-# Getting Started with Blazor Spreadsheet in Web App
+# Getting Started with the Blazor Spreadsheet in Web App
-This section briefly explains about how to include [Syncfusion Blazor Spreadsheet](https://www.syncfusion.com/blazor-components/blazor-spreadsheet) component in your Blazor Web App using [Visual Studio](https://visualstudio.microsoft.com/vs/) and Visual Studio Code.
+This section provides a brief guide on including the [Blazor Spreadsheet](https://www.syncfusion.com/blazor-components/blazor-spreadsheet) component in a Blazor Web App using [Visual Studio](https://visualstudio.microsoft.com/vs/) and [Visual Studio Code](https://code.visualstudio.com/).
{% tabcontents %}
@@ -19,13 +19,13 @@ This section briefly explains about how to include [Syncfusion Blazor Spreadshee
* [System requirements for Blazor components](https://blazor.syncfusion.com/documentation/system-requirements)
-## Create a new Blazor Web App in Visual Studio
+## Create a New Blazor Web App in Visual Studio
-You can create a **Blazor Web App** using Visual Studio 2022 via [Microsoft Templates](https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?view=aspnetcore-8.0) or the [Syncfusion® Blazor Extension](https://blazor.syncfusion.com/documentation/visual-studio-integration/template-studio).
+Create a **Blazor Web App** using Visual Studio 2022 via [Microsoft Templates](https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?view=aspnetcore-8.0) or the [Syncfusion® Blazor Extension](https://blazor.syncfusion.com/documentation/visual-studio-integration/template-studio).
-You need to configure the corresponding [Interactive render mode](https://learn.microsoft.com/en-us/aspnet/core/blazor/components/render-modes?view=aspnetcore-8.0#render-modes) and [Interactivity location](https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?view=aspnetcore-8.0&pivots=windows) while creating a Blazor Web Application.
+Need to configure the corresponding [Interactive render mode](https://learn.microsoft.com/en-us/aspnet/core/blazor/components/render-modes?view=aspnetcore-8.0#render-modes) and [Interactivity location](https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?view=aspnetcore-8.0&pivots=windows) while creating a Blazor Web Application.
-## Install Syncfusion® Blazor Spreadsheet and Themes NuGet in the App
+## Install Syncfusion® Blazor Spreadsheet and Themes NuGet Packages in the App
To add **Syncfusion Blazor Spreadsheet** component in the app, open the NuGet package manager in Visual Studio (*Tools → NuGet Package Manager → Manage NuGet Packages for Solution*), search and install [Syncfusion.Blazor.Spreadsheet](https://www.nuget.org/packages/Syncfusion.Blazor.Spreadsheet) and [Syncfusion.Blazor.Themes](https://www.nuget.org/packages/Syncfusion.Blazor.Themes/).
@@ -42,7 +42,7 @@ Install-Package Syncfusion.Blazor.Themes -Version {{ site.releaseversion }}
{% endhighlight %}
{% endtabs %}
-N> Syncfusion® Blazor components are available in [nuget.org](https://www.nuget.org/packages?q=syncfusion.blazor). Refer to [NuGet packages](https://blazor.syncfusion.com/documentation/nuget-packages) topic for available NuGet packages list with component details.
+N> Syncfusion® Blazor components are available in [nuget.org](https://www.nuget.org/packages?q=syncfusion.blazor). Refer to [NuGet packages](https://blazor.syncfusion.com/documentation/nuget-packages) topic for available NuGet packages list with component details.
{% endtabcontent %}
@@ -52,11 +52,11 @@ N> Syncfusion® Blazor components are availa
* [System requirements for Blazor components](https://blazor.syncfusion.com/documentation/system-requirements)
-## Create a new Blazor Web App in Visual Studio Code
+## Create a New Blazor Web App in Visual Studio Code
-You can create a **Blazor Web App** using Visual Studio Code via [Microsoft Templates](https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?view=aspnetcore-8.0&pivots=vsc) or the [Syncfusion® Blazor Extension](https://blazor.syncfusion.com/documentation/visual-studio-code-integration/create-project).
+Create a **Blazor Web App** using Visual Studio Code via [Microsoft Templates](https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?view=aspnetcore-8.0&pivots=vsc) or the [Syncfusion® Blazor Extension](https://blazor.syncfusion.com/documentation/visual-studio-code-integration/create-project).
-You need to configure the corresponding [Interactive render mode](https://learn.microsoft.com/en-us/aspnet/core/blazor/components/render-modes?view=aspnetcore-8.0#render-modes) and [Interactivity location](https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?view=aspnetcore-8.0&pivots=vsc) while creating a Blazor Web Application.
+Need to configure the corresponding [Interactive render mode](https://learn.microsoft.com/en-us/aspnet/core/blazor/components/render-modes?view=aspnetcore-8.0#render-modes) and [Interactivity location](https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?view=aspnetcore-8.0&pivots=vsc) while creating a Blazor Web Application.
For example, in a Blazor Web App with the `Auto` interactive render mode, use the following commands.
@@ -72,7 +72,7 @@ cd BlazorWebApp.Client
N> For more information on creating a **Blazor Web App** with various interactive modes and locations, refer to this [link](./getting-started/blazor-web-app?tabcontent=visual-studio-code#render-interactive-modes).
-## Install Syncfusion® Blazor Spreadsheet and Themes NuGet in the App
+## Install Syncfusion® Blazor Spreadsheet and Themes NuGet in the App
If you utilize `WebAssembly` or `Auto` render modes in the Blazor Web App need to be install Syncfusion® Blazor components NuGet packages within the client project.
@@ -92,7 +92,7 @@ dotnet restore
{% endtabs %}
-N> Syncfusion® Blazor components are available in [nuget.org](https://www.nuget.org/packages?q=syncfusion.blazor). Refer to [NuGet packages](https://blazor.syncfusion.com/documentation/nuget-packages) topic for available NuGet packages list with component details.
+N> Syncfusion® Blazor components are available in [nuget.org](https://www.nuget.org/packages?q=syncfusion.blazor). Refer to [NuGet packages](https://blazor.syncfusion.com/documentation/nuget-packages) topic for available NuGet packages list with component details.
{% endtabcontent %}
@@ -116,7 +116,7 @@ Import the `Syncfusion.Blazor` and `Syncfusion.Blazor.Spreadsheet` namespace.
{% endhighlight %}
{% endtabs %}
-Now, register the Syncfusion® Blazor Service in the **~/Program.cs** file of your Blazor Web App.
+Now, register the Syncfusion® BlazorService in the **~/Program.cs** file of your Blazor Web App.
If the **Interactive Render Mode** is set to `WebAssembly` or `Auto`, you need to register the Syncfusion® Blazor service in both **~/Program.cs** files of your Blazor Web App.
@@ -233,4 +233,4 @@ N> If an **Interactivity Location** is set to `Global` and the **Render Mode** i
{% endhighlight %}
{% endtabs %}
-* Press Ctrl+F5 (Windows) or ⌘+F5 (macOS) to launch the application. This will render the Syncfusion Blazor Spreadsheet in your default web browser.
\ No newline at end of file
+* Press Ctrl+F5 (Windows) or ⌘+F5 (macOS) to launch the application. This will render the Syncfusion Blazor Spreadsheet in your default web browser.
diff --git a/Document-Processing/Excel/Spreadsheet/Blazor/getting-started.md b/Document-Processing/Excel/Spreadsheet/Blazor/getting-started.md
index 8d4356efc..05f563729 100644
--- a/Document-Processing/Excel/Spreadsheet/Blazor/getting-started.md
+++ b/Document-Processing/Excel/Spreadsheet/Blazor/getting-started.md
@@ -142,16 +142,20 @@ Add the Syncfusion® Blazor Spreadsheet comp
{% tabs %}
{% highlight razor %}
+Note: Due to browser-level restrictions in WebAssembly (WASM), the method File.ReadAllBytes is not supported. As a result, the sample implementations provided use a Base64-encoded Excel file to import data. This approach ensures compatibility with WASM environments, where direct file system access is limited. Instead of reading the file from disk, the Excel content is embedded or passed as a Base64 string, which is then decoded within the application to simulate file input. This method allows seamless data import while adhering to the constraints of the WebAssembly runtime.
+
@code {
public byte[] DataSourceBytes { get; set; }
+
protected override void OnInitialized()
{
- string filePath = "wwwroot/Sample.xlsx";
- DataSourceBytes = File.ReadAllBytes(filePath);
+ // Replace with your base64-encoded Excel file
+ string base64File = "YourBase64EncodedExcelFileHere";
+ DataSourceBytes = Convert.FromBase64String(base64File);
}
}
diff --git a/Document-Processing/Excel/Spreadsheet/Blazor/hyperlink.md b/Document-Processing/Excel/Spreadsheet/Blazor/hyperlink.md
index 5490b21f7..44ef86caf 100644
--- a/Document-Processing/Excel/Spreadsheet/Blazor/hyperlink.md
+++ b/Document-Processing/Excel/Spreadsheet/Blazor/hyperlink.md
@@ -1,32 +1,32 @@
---
layout: post
-title: Hyperlink in the Blazor Spreadsheet component | Syncfusion
-description: Checkout and learn how to insert, edit, and remove hyperlink in the Syncfusion Blazor Spreadsheet component and more.
+title: Hyperlinks in the Blazor Spreadsheet component | Syncfusion
+description: Learn how to insert, edit, remove, and manage hyperlinks in the Syncfusion Blazor Spreadsheet component,programmatic methods, and events.
platform: document-processing
control: Spreadsheet
documentation: ug
---
-# Hyperlink in Blazor Spreadsheet component
+# Hyperlinks in the Blazor Spreadsheet component
-Hyperlink in the Blazor Spreadsheet enable interactive navigation both within and outside of spreadsheets. This feature creates clickable link that connect to external web URLs, specific cells within the current worksheet, or cells in other worksheets. To control this functionality, use the [AllowHyperlink](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.SfSpreadsheet.html#Syncfusion_Blazor_Spreadsheet_SfSpreadsheet_AllowHyperlink) property, which enables or disables hyperlink support in the Spreadsheet. The default value of the `AllowHyperlink` property is **true**.
+Hyperlinks in the Blazor Spreadsheet enable interactive navigation both within and outside of spreadsheets. This feature creates clickable links that connect to external web URLs, specific cells within the current worksheet, or cells in other worksheets. To control this functionality, use the [AllowHyperlink](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.SfSpreadsheet.html#Syncfusion_Blazor_Spreadsheet_SfSpreadsheet_AllowHyperlink) property, which enables or disables hyperlink support in the Spreadsheet. The default value of the `AllowHyperlink` property is **true**.
The keyboard shortcut `Ctrl + K` can be used to quickly open the **Insert** or **Edit** hyperlink dialog for the active cell, without using the UI elements. This shortcut works regardless of whether the hyperlink functionality is accessed through the Ribbon or the Context Menu.
N> When `AllowHyperlink` is set to **false**, the hyperlink options are removed from the interface (Ribbon and Context Menu), although existing hyperlinks will still function. Additionally, shortcut keys (**Ctrl + K**) and API methods related to this feature will no longer work.
-## Insert hyperlink
+## Insert Hyperlink
-Hyperlink can be added to worksheet cells to create interactive elements that improve navigation and connect data to external sources. These links can point to:
-* **Web URLs** - Direct access to websites, such as https://www.syncfusion.com
-* **Cell References** - Quick jumps to specific cells within the same sheet, like **A1** or a range such as **B5:C10**
-* **Sheet References** - Navigation to cells in other sheets, for example, **Sheet2!A1**
+Hyperlinks can be added to worksheet cells to create interactive elements that improve navigation and connect data to external sources. These links can point to:
+* **Web URLs** - Direct access to websites, such as `https://www.syncfusion.com`.
+* **Cell References** - Quick jumps to specific cells within the same sheet, like `A1` or a range such as `B5:C10`.
+* **Sheet References** - Navigation to cells in other sheets, for example, `Sheet2!A1`.
The linked cells are typically formatted with underlined and colored text to indicate they are clickable.
-### Insert hyperlink via UI
+### Insert Hyperlink via UI
-Hyperlink can be inserted through the user interface (UI) using any of the following methods:
+Hyperlinks can be inserted through the user interface (UI) using any of the following methods:
**Using the Ribbon**
@@ -47,9 +47,9 @@ Hyperlink can be inserted through the user interface (UI) using any of the follo

-### Insert hyperlink programmatically
+### Insert Hyperlink Programmatically
-Hyperlink can be added programmatically using the [AddHyperlinkAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.SfSpreadsheet.html#Syncfusion_Blazor_Spreadsheet_SfSpreadsheet_AddHyperlinkAsync_System_String_System_String_System_String_) method. This method allows hyperlink to be added to cell or range of cells without using the UI. The available parameters in the `AddHyperlinkAsync` method are:
+Hyperlinks can be added programmatically using the [AddHyperlinkAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.SfSpreadsheet.html#Syncfusion_Blazor_Spreadsheet_SfSpreadsheet_AddHyperlinkAsync_System_String_System_String_System_String_) method. This method allows hyperlinks to be added to a cell or range of cells without using the UI. The available parameters in the `AddHyperlinkAsync` method are:
| Parameter | Type | Description |
| -- | -- | -- |
@@ -119,18 +119,18 @@ await spreadsheetInstance.AddHyperlinkAsync("D1", "https://www.syncfusion.com",
{% endhighlight %}
{% endtabs %}
-## Edit hyperlink
+## Edit Hyperlink
-Hyperlink in a spreadsheet can be edited to update the destination or the display text. This includes:
+Hyperlinks in a spreadsheet can be edited to update the destination or the display text. This includes:
- **Changing the Web URL** - Update the hyperlink to point to a different website or online resource.
- **Editing the Display Text** - Modify the text in the cell without affecting the link destination.
-- **Updating Cell References** - Modify the hyperlink to point to a different cell in the same sheet (e.g., from A1 to B5).
-- **Linking to Another Sheet** - Redirect the hyperlink to a different sheet by modifying the sheet name in the reference (e.g., from Sheet1!A1 to Sheet2!C3).
+- **Updating Cell References** - Modify the hyperlink to point to a different cell in the same sheet (e.g., from `A1` to `B5`).
+- **Linking to Another Sheet** - Redirect the hyperlink to a different sheet by modifying the sheet name in the reference (e.g., from `Sheet1!A1` to `Sheet2!C3`).
-### Edit hyperlink via UI
+### Edit Hyperlink via UI
-Hyperlink can be edited through the user interface (UI) using any of the following methods:
+Hyperlinks can be edited through the user interface (UI) using any of the following methods:
**Using the Ribbon**
@@ -151,27 +151,27 @@ Hyperlink can be edited through the user interface (UI) using any of the followi

-> When editing hyperlink to other sheets, ensure that the target sheet exists in the workbook. Link to non-existent sheets result in errors when clicked.
+> When editing hyperlinks to other sheets, ensure that the target sheet exists in the workbook. Links to non-existent sheets result in errors when clicked.
-## Remove hyperlink
+## Remove Hyperlink
-Removing a hyperlink disconnects the cells from their associated destinations while retaining the display text. This operation eliminates only the hyperlink functionality without altering the actual content of the cells. Any cells that do not contain a hyperlink are ignored during the process, and no errors are generated.
+Removing a hyperlink disconnects the cell from its associated destination while retaining the display text. This operation eliminates only the hyperlink functionality without altering the actual content of the cell. Any cells that do not contain a hyperlink are ignored during the process, and no errors are generated.
-### Remove hyperlink via UI
+### Remove Hyperlink via UI
To remove a hyperlink using the interface, select the cell that contains the hyperlink, then right-click to open the context menu. From the available options, choose **Remove Hyperlink** to delete the link from the selected cell.
-When dealing with multiple hyperlinks, selecting a range of cells - such as A1 to D5 - allows all hyperlinks within that range to be removed in a single operation. This method is efficient for cleaning up large sets of hyperlinks quickly.
+When dealing with multiple hyperlinks, selecting a range of cells-such as `A1` to `D5`-allows all hyperlinks within that range to be removed in a single operation. This method is efficient for cleaning up large sets of hyperlinks quickly.

-### Remove hyperlink programmatically
+### Remove Hyperlink Programmatically
-Hyperlink can be removed programmatically by using the [RemoveHyperlinkAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.SfSpreadsheet.html#Syncfusion_Blazor_Spreadsheet_SfSpreadsheet_RemoveHyperlinkAsync_System_String_) method. This method eliminates hyperlink functionality from the specified cell or range of cells within a spreadsheet, allowing for efficient bulk removal through code. The available parameters in the `RemoveHyperlinkAsync` method are:
+Hyperlinks can be removed programmatically by using the [RemoveHyperlinkAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.SfSpreadsheet.html#Syncfusion_Blazor_Spreadsheet_SfSpreadsheet_RemoveHyperlinkAsync_System_String_) method. This method eliminates hyperlink functionality from the specified cell or range of cells within a spreadsheet, allowing for efficient bulk removal through code. The available parameters in the `RemoveHyperlinkAsync` method are:
| Parameter | Type | Description |
| -- | -- | -- |
-| cellAddress | string | Specifies the cell or range of cells from which hyperlink should be removed. |
+| cellAddress | string | Specifies the cell or range of cells from which hyperlinks should be removed. |
{% tabs %}
{% highlight razor tabtitle="Index.razor" %}
@@ -225,7 +225,7 @@ await spreadsheetInstance.RemoveHyperlinkAsync("Sheet3!A1:A20");
## Events
-The Blazor Spreadsheet provides events that are triggered during hyperlink operations, such as [HyperlinkCreating](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.HyperlinkCreatingEventArgs.html), [HyperlinkCreated](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.HyperlinkCreatedEventArgs.html), and [HyperlinkClick](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.HyperlinkClickEventArgs.html). These events enable the execution of custom actions before and after hyperlink is created or interacted with, allowing for validation, customization, and response handling.
+The Blazor Spreadsheet provides events that are triggered during hyperlink operations, such as [HyperlinkCreating](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.HyperlinkCreatingEventArgs.html), [HyperlinkCreated](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.HyperlinkCreatedEventArgs.html), and [HyperlinkClick](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.HyperlinkClickEventArgs.html). These events enable the execution of custom actions before and after a hyperlink is created or interacted with, allowing for validation, customization, and response handling.
* **HyperlinkCreating** - The `HyperlinkCreating` event is triggered prior to the creation of a hyperlink. It offers an opportunity to modify or validate the hyperlink details before the link is added to the sheet, enabling custom logic or restrictions to be applied during the hyperlink creation process.
@@ -235,11 +235,11 @@ The Blazor Spreadsheet provides events that are triggered during hyperlink opera
### HyperlinkCreating
-The `HyperlinkCreating` event is triggered before a hyperlink is added to cell. This event provides an opportunity to inspect, modify, or cancel the hyperlink creation process based on custom logic or validation requirements.
+The `HyperlinkCreating` event is triggered before a hyperlink is added to a cell. This event provides an opportunity to inspect, modify, or cancel the hyperlink creation process based on custom logic or validation requirements.
**Purpose**
-This event is useful for scenarios where hyperlink behavior needs to be controlled dynamically - such as restricting certain URLs, customizing display text, or preventing hyperlinks in specific cells.
+This event is useful for scenarios where hyperlink behavior needs to be controlled dynamically, such as restricting certain URLs, customizing display text, or preventing hyperlinks in specific cells.
**Event Arguments**
@@ -248,7 +248,7 @@ The event uses the [HyperlinkCreatingEventArgs](https://help.syncfusion.com/cr/b
| Event Arguments | Description |
|----------------|-------------|
| Uri | Represents the hyperlink destination, which can be a web URL or an internal sheet reference in the format **"SheetName!CellReference"**. This value can be modified to redirect the hyperlink to a different location. |
-| CellAddress | Specifies the cell location where the hyperlink will be inserted. The address must be specified using A1 notation (e.g., "A1", "B5"). |
+| CellAddress | Specifies the cell location where the hyperlink will be inserted. The address must be specified using A1 notation (e.g., `A1`, `B5`). |
| DisplayText | Defines the visible text shown in the cell for the hyperlink. This can be customized to provide a user-friendly label, distinct from the actual hyperlink destination. |
| Cancel | Indicates whether the hyperlink creation should be aborted. Setting this property to **true** prevents the hyperlink from being added, allowing for conditional validation or restriction logic. |
@@ -301,7 +301,7 @@ The `HyperlinkCreated` event is triggered after a hyperlink has been successfull
**Purpose**
-This event is useful for scenarios where actions need to be taken after a hyperlink is created - such as confirming the link, updating related metadata, or notifying users of the change.
+This event is useful for scenarios where actions need to be taken after a hyperlink is created, such as confirming the link, updating related metadata, or notifying users of the change.
**Event Arguments**
@@ -309,8 +309,8 @@ The [HyperlinkCreatedEventArgs](https://help.syncfusion.com/cr/blazor/Syncfusion
| Event Arguments | Description |
|----------------|-------------|
-| Uri | Represents the hyperlink destination, which can be either an external web URL (e.g., "https://example.com") or an internal sheet references. This value is read-only and reflects the final destination of the hyperlink. |
-| CellAddress | Specifies the cell location where the hyperlink has been inserted. The address is provided in A1 notation (e.g., **"A1"**, **"B5"**), and indicates the exact position of the hyperlink in the worksheet. This value is read-only. |
+| Uri | Represents the hyperlink destination, which can be either an external web URL (e.g., `https://example.com`) or an internal sheet reference. This value is read-only and reflects the final destination of the hyperlink. |
+| CellAddress | Specifies the cell location where the hyperlink has been inserted. The address is provided in A1 notation (e.g., `A1`, `B5`), and indicates the exact position of the hyperlink in the worksheet. This value is read-only. |
| DisplayText | Defines the visible text shown in the cell for the hyperlink. This user-friendly label may differ from the actual hyperlink address and is useful for providing descriptive or meaningful link text. This value is read-only. |
{% tabs %}
@@ -348,7 +348,7 @@ The `HyperlinkClick` event is triggered when a hyperlink within the spreadsheet
**Purpose**
-This event is designed for observing hyperlink interactions and executing custom logic in response. Since all event arguments are read-only, it is not intended for modifying the hyperlink but rather for handling actions that follow a click - such as auditing, validation, or UI updates.
+This event is designed for observing hyperlink interactions and executing custom logic in response. Since all event arguments are read-only, it is not intended for modifying the hyperlink but rather for handling actions that follow a click, such as auditing, validation, or UI updates.
**Event Arguments**
@@ -356,8 +356,8 @@ The [HyperlinkClickEventArgs](https://help.syncfusion.com/cr/blazor/Syncfusion.B
| Event Arguments | Description |
|----------------|-------------|
-| Uri | Represents the hyperlink destination, which may be an external web URL (e.g., **"https://example.com"**) or an internal sheet references. This value reflects the actual navigation target of the hyperlink. This value is read only. |
-| CellAddress | Specifies the cell location where the hyperlink resides. The address is provided in A1 notation (e.g., **"A1"**, **"B5"**), indicating the exact position of the hyperlink in the worksheet. This value is read only. |
+| Uri | Represents the hyperlink destination, which may be an external web URL (e.g., `https://example.com`) or an internal sheet reference. This value reflects the actual navigation target of the hyperlink. This value is read only. |
+| CellAddress | Specifies the cell location where the hyperlink resides. The address is provided in A1 notation (e.g., `A1`, `B5`), indicating the exact position of the hyperlink in the worksheet. This value is read only. |
| DisplayText | Defines the visible text shown in the cell for the hyperlink. This user-friendly label may differ from the actual hyperlink address and is useful for identifying the link's purpose or context. This value is read only.|
{% tabs %}
@@ -393,4 +393,4 @@ The [HyperlinkClickEventArgs](https://help.syncfusion.com/cr/blazor/Syncfusion.B
}
{% endhighlight %}
-{% endtabs %}
\ No newline at end of file
+{% endtabs %}
diff --git a/Document-Processing/Excel/Spreadsheet/Blazor/open-and-save.md b/Document-Processing/Excel/Spreadsheet/Blazor/open-and-save.md
index acd778b2b..225458706 100644
--- a/Document-Processing/Excel/Spreadsheet/Blazor/open-and-save.md
+++ b/Document-Processing/Excel/Spreadsheet/Blazor/open-and-save.md
@@ -1,20 +1,21 @@
---
layout: post
-title: Open and save in Blazor Spreadsheet Component | Syncfusion
-description: Checkout and learn here all about open and save in Syncfusion Blazor Spreadsheet component and more | Syncfusion.
+title: Open and Save in Blazor Spreadsheet Component | Syncfusion
+description: Learn how to open and save Excel files in the Syncfusion Blazor Spreadsheet component and more | Syncfusion.
platform: document-processing
control: Spreadsheet
documentation: ug
---
-# Open and Save in Blazor Spreadsheet component
+# Open and Save in Blazor Spreadsheet Component
-The **Open** and **Save** options in the Blazor Spreadsheet component enable efficient management of Excel files. These functionalities support opening existing Excel files for analysis and modification, as well as saving updates or new files to the system in compatible formats.
+The **Open** and **Save** functionalities in the Blazor Spreadsheet component allow for efficient management of Excel files. You can open existing Excel files for analysis and modification, and save new or modified spreadsheets in a compatible format.
## Open
-The Blazor Spreadsheet component preserves all data, cell styles, formatting, and other spreadsheet elements when loading Excel files. These files can be accessed either through user interface actions or programmatic methods.
+The Blazor Spreadsheet component preserves all data, cell styles, formatting, and other spreadsheet elements when opening Excel files. These files can be loaded through the user interface action or programmatic methods.
### Open an Excel file via UI
+
To open an Excel document using the interface, select the **File > Open** option from the **Ribbon**. A file explorer dialog will appear, allowing selection of the desired Excel file for loading into the component.

@@ -46,8 +47,8 @@ To load Excel files programmatically, they can be converted into byte arrays. Th
{% endhighlight %}
{% endtabs %}
-### Open an Excel file from Base64 string data
-To load Excel files encoded as Base64 strings into the component, this option proves effective in scenarios involving data retrieval from databases or APIs.
+### Open an Excel file from a Base64 string
+An Excel file encoded as a Base64 string can be loaded into the Spreadsheet component by converting the string into a byte array and then into a stream. This method is effective when retrieving file data from a database or an API.
{% tabs %}
{% highlight razor tabtitle="Index.razor" %}
@@ -72,15 +73,15 @@ To load Excel files encoded as Base64 strings into the component, this option pr
{% endtabs %}
### Supported file formats
-The Spreadsheet component supports the following file formats for opening:
-* Microsoft Excel (.xlsx)
+The Spreadsheet component supports opening the following file formats:
+* Microsoft Excel Workbook (.xlsx)
* Microsoft Excel 97-2003 (.xls)
## Save
-The Spreadsheet component allows saving data, styles, formatting, and additional content as an Excel file. This functionality ensures that all modifications are retained in a compatible format.
+The Spreadsheet component allows you to save data, styles, formatting, and other content as an Excel file. This functionality ensures that all modifications are preserved in a compatible format.
### Save an Excel file using UI
-To save the Spreadsheet content through the user interface, select the **File > Save As** option from the **Ribbon**.
+To save the Spreadsheet content through the user interface, select the **File > Save As** option from the **Ribbon**.You can then specify the file name and format in the save dialog.

@@ -93,6 +94,6 @@ When a protected sheet or workbook is saved or downloaded, all associated settin
The Spreadsheet component supports saving files in the Microsoft Excel (.xlsx) format.
## New
-To create a new workbook through the user interface, select **File > New** from the **Ribbon**. This action initializes a blank Spreadsheet component, ready for data entry or formatting. If unsaved changes are present, a confirmation dialog will appear, indicating that these changes will be lost. The dialog presents options to proceed with creating the new workbook by selecting **OK**, or to cancel the operation by selecting **Cancel**.
+To create a new, blank workbook through the UI, select **File > New** from the **Ribbon**. This action initializes a blank spreadsheet component, ready for data entry or formatting. If unsaved changes are present, a confirmation dialog will appear, indicating that these changes will be lost. The dialog presents options to proceed with creating the new workbook by selecting **OK**, or to cancel the operation by selecting **Cancel**.
-
\ No newline at end of file
+
diff --git a/Document-Processing/Excel/Spreadsheet/Blazor/overview.md b/Document-Processing/Excel/Spreadsheet/Blazor/overview.md
index 91df05720..fd0f59159 100644
--- a/Document-Processing/Excel/Spreadsheet/Blazor/overview.md
+++ b/Document-Processing/Excel/Spreadsheet/Blazor/overview.md
@@ -1,30 +1,30 @@
---
layout: post
-title: Overview of the Blazor Spreadsheet control | Syncfusion
-description: Learn here all about Overview of the Syncfusion Blazor Spreadsheet control and more.
+title: Overview of the Blazor Spreadsheet Control | Syncfusion
+description: Explore the Syncfusion Blazor Spreadsheet control, a powerful component for creating, editing, and analyzing data in a familiar Excel-like interface.
platform: document-processing
control: Spreadsheet
documentation: ug
---
-# Overview of the Blazor Spreadsheet control
+# Overview of the Blazor Spreadsheet Control
-The Blazor Spreadsheet is an user interactive control to organize and analyze data in tabular format with configuration options for customization. It will load data by importing an Excel file or from local file paths and Base64 string data. The populated data can be exported as Excel files in xlsx format.
+The Syncfusion Blazor Spreadsheet is a user-interactive component designed to organize and analyze data in a tabular format with configuration options for customization. It will load data by importing an Excel file or from local file paths and Base64 string data. The populated data can be exported as Excel files in `.xlsx` format.
## Key features
-* [Editing](editing): Provides the option to dynamically edit a cell with support for direct cell editing and formula bar editing capabilities.
-* [Selection](selection): Provides comprehensive selection options including individual cells, rows, columns, and ranges with support for both mouse and keyboard interactions.
-* [Open and Save](open-and-save): Provides the option to open Excel files (.xlsx and .xls formats) in Spreadsheet and save data as Excel files (.xlsx format) with support for Base64 string loading and local file operations.
-* [Clipboard](clipboard): Provides comprehensive clipboard operations including cut, copy, and paste functionality with support for external clipboard data from applications like Excel and Google Sheets.
-* [Formulas](formulas): Provides built-in calculation library with pre-defined formulas, named range support, and automatic/manual calculation modes.
-* [Cell formatting](cell-range#cell-formatting): Provides extensive cell formatting options including font properties, colors, borders, alignment, and text styling to enhance data presentation.
-* [Sorting](sorting): Helps arrange data in ascending or descending order with support for single-column sorting.
-* [Filtering](filtering): Helps view specific rows by hiding others with support for text, number, and date filters along with custom filter conditions.
-* [Hyperlink](hyperlink): Provides the option to create navigational links to web URLs or cell references within the same sheet or across different sheets.
-* [Undo Redo](undo-redo): Provides the option to perform undo and redo operations with support for up to 25 operations in history.
-* [Worksheet](worksheet): Comprehensive worksheet management including insert, delete, rename, hide, unhide, move, and duplicate sheet operations.
-* [Protection](protection): Provides sheet and workbook protection capabilities with password support, selective unlocking of ranges, and configurable permission settings.
-* [Context Menu](contextmenu): Provides context-sensitive menus for cells, rows, and columns with operations like cut, copy, paste, insert, delete, sort, filter, and hyperlink management.
-* [Cell Range Management](cell-range): Advanced cell range operations including auto-fill, wrap text, and clear operations for content, formats, and hyperlinks.
-* [Accessibility](accessibility): Provides built-in accessibility support with keyboard navigation, ARIA attributes, and screen reader compatibility for enhanced usability.
+* [**Editing**](editing): Provides the option to dynamically edit a cell with support for direct cell editing and formula bar editing capabilities.
+* [**Selection**](selection): Provides comprehensive selection options including individual cells, rows, columns, and ranges with support for both mouse and keyboard interactions.
+* [**Open and Save**](open-and-save): Provides the option to open Excel files (.xlsx and .xls formats) in Spreadsheet and save data as Excel files (.xlsx format) with support for Base64 string loading and local file operations.
+* [**Clipboard**](clipboard): Provides comprehensive clipboard operations including cut, copy, and paste functionality with support for external clipboard data from applications like Excel and Google Sheets.
+* [**Formulas**](formulas): Provides built-in calculation library with pre-defined formulas, named range support, and automatic/manual calculation modes.
+* [**Cell formatting**](cell-range#cell-formatting): Provides extensive cell formatting options including font properties, colors, borders, alignment, and text styling to enhance data presentation.
+* [**Sorting**](sorting): Helps arrange data in ascending or descending order with support for single-column sorting helps users quickly organize and find information.
+* [**Filtering**](filtering): Helps view specific rows by hiding others with support for text, numbers, and date filters along with custom filter conditions.
+* [**Hyperlink**](hyperlink): Provides the option to create navigational links to web URLs or cell references within the same sheet or across different sheets.
+* [**Undo Redo**](undo-redo): Provides the option to perform undo and redo actions with a history that tracks up to 25 operations, allowing for quick corrections and revisions.
+* [**Worksheet**](worksheet): Comprehensive worksheet management including inserting, deleting, renaming, hiding/unhiding, moving, and duplicating sheets.
+* [**Protection**](protection): Provides sheet and workbook protection capabilities with password support, selective unlocking of ranges, and configurable permission settings.
+* [**Context Menu**](contextmenu): Provides context-sensitive menus for cells, rows, and columns with operations like cut, copy, paste, insert, delete, sort, filter, and hyperlink management.
+* [**Cell Range Management**](cell-range): Advanced cell range operations including auto-fill, wrap text, and clear operations for content, formats, and hyperlinks.
+* [**Accessibility**](accessibility): Provides built-in accessibility support with keyboard navigation, ARIA attributes, and screen reader compatibility for enhanced usability.
diff --git a/Document-Processing/Excel/Spreadsheet/Blazor/protection.md b/Document-Processing/Excel/Spreadsheet/Blazor/protection.md
index 7949fd42c..28e1a1780 100644
--- a/Document-Processing/Excel/Spreadsheet/Blazor/protection.md
+++ b/Document-Processing/Excel/Spreadsheet/Blazor/protection.md
@@ -1,7 +1,7 @@
---
layout: post
-title: Protect Sheet in Blazor Spreadsheet Component | Syncfusion
-description: Checkout and learn here all about protect sheet in Syncfusion Blazor Spreadsheet component and more.
+title: Protection in Blazor Spreadsheet Component | Syncfusion
+description: Learn how to protect and unprotect worksheets and workbooks in the Syncfusion Blazor Spreadsheet component, both through the UI and more.
platform: document-processing
control: Spreadsheet
documentation: ug
@@ -11,17 +11,18 @@ documentation: ug
Sheet protection is used to prevent unauthorized modification of data within the sheet.
-## Protect Sheet
+## Sheet Protection
The **Protect Sheet** support helps prevent accidental changes such as editing, moving, or deleting data. Protection can be applied with or without a password, depending on the level of security required.
-### Protecting sheets via the UI
+### Protecting a sheet via the UI
-In the active sheet, the sheet protection can be done by any of the following ways:
+The active sheet can be protected using any of the following ways:
-* Select **Protect Sheet** from the **Review** tab in the Ribbon toolbar and choose the desired options.
+* Navigate to the **Review** tab in the Ribbon and select **Protect Sheet**.
+* Right-click the sheet's tab in the bottom bar and select **Protect Sheet** from the context menu.
-* Right-click the sheet tab context menu option, select **Protect Sheet** from the context menu, and choose the desired options.
+In the **Protect Sheet** dialog, you can set a password and specify which actions users are allowed to perform.

@@ -107,4 +108,4 @@ To unprotect the workbook:
* Enter the correct password in the dialog box, then click **OK**.
-
\ No newline at end of file
+
diff --git a/Document-Processing/Excel/Spreadsheet/Blazor/selection.md b/Document-Processing/Excel/Spreadsheet/Blazor/selection.md
index 48d6cdbaf..296382783 100644
--- a/Document-Processing/Excel/Spreadsheet/Blazor/selection.md
+++ b/Document-Processing/Excel/Spreadsheet/Blazor/selection.md
@@ -1,39 +1,39 @@
---
layout: post
title: Selection in Blazor Spreadsheet Component | Syncfusion
-description: Checkout and learn here all about comprehensive selection functionality in Syncfusion Blazor Spreadsheet component and much more.
+description: Learn about the comprehensive selection functionality in the Syncfusion Blazor Spreadsheet component, including programmatic and UI-driven methods.
platform: document-processing
control: Spreadsheet
documentation: ug
---
-# Selection in Blazor Spreadsheet component
+# Selection in Blazor Spreadsheet Component
The selection feature in the Spreadsheet component enables interactive highlighting and manipulation of cells, rows, or columns for data analysis and editing operations. The functionality offers intuitive mouse and keyboard interactions for efficient data management.
The Blazor Spreadsheet provides multiple selection options to manage and analyze data effectively:
-* **Cell Selection** - Select individual cells or ranges of cells for data manipulation
-* **Row Selection** - Select entire rows for row-based operations
-* **Column Selection** - Select entire columns for column-based operations
+* **Cell Selection**: Select individual cells or range of cells for data manipulation
+* **Row Selection**: Select entire rows for row-based operations
+* **Column Selection**: Select entire columns for column-based operations
**Accessing selection via the UI**
In the active sheet, selection can be performed using any of the following ways:
* **Using Mouse Interaction**:
- * Click to select individual cells
- * Click and drag to select ranges
- * Click row or column headers for full row or column selection
+ * Click a cell to select it.
+ * Click and drag to select a range of cells.
+ * Click a row or column header to select the entire row or column.
* **Using Keyboard Navigation**:
- * Use **Arrow** keys to navigate and select cells
+ * Use **Arrow** keys to navigate between cells
* Use **Shift + Arrow** keys for range selection
* Use **Ctrl + Click** for non-adjacent selections
-* **Using Name Box**: Enter cell references or range names and press **Enter** key to select the specified range.
+* **Using Name Box**: Enter a cell reference (e.g., `C5`) or a range (`A1:E5`) and press **Enter** key to select the specified range.
-## Cell selection
+## Cell Selection
The Blazor Spreadsheet component allows selecting individual cells or ranges of cells for various data operations. Cell selection forms the foundation of most Spreadsheet interactions and serves as the basis for data entry and formatting.
@@ -74,9 +74,9 @@ The column selection operation can be performed using the following methods:
* **Non-adjacent columns**: Hold **Ctrl** while clicking individual column headers
* **Range with keyboard**: Use **Shift + Arrow** keys after selecting the initial column
-## Implementing selection programmatically
+## Implementing Selection Programmatically
-The Spreadsheet component supports comprehensive programmatic selection using the [SelectRangeAsync()](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.SfSpreadsheet.html#Syncfusion_Blazor_Spreadsheet_SfSpreadsheet_SelectRangeAsync_System_String_) method. This method accepts various range formats and selection patterns.
+The Spreadsheet component supports programmatic selection for cells, rows, and columns using the [SelectRangeAsync()](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.SfSpreadsheet.html#Syncfusion_Blazor_Spreadsheet_SfSpreadsheet_SelectRangeAsync_System_String_) method. This method accepts various range formats and selection patterns.
{% tabs %}
{% highlight razor tabtitle="Index.razor" %}
@@ -113,4 +113,4 @@ The Spreadsheet component supports comprehensive programmatic selection using th
The following image illustrates the comprehensive selection capabilities available in the Blazor Spreadsheet component, including cell, row, and column selection using both mouse and keyboard interactions.
-
+
diff --git a/Document-Processing/Excel/Spreadsheet/Blazor/sorting.md b/Document-Processing/Excel/Spreadsheet/Blazor/sorting.md
index a5bcdd3a0..3d53cb94f 100644
--- a/Document-Processing/Excel/Spreadsheet/Blazor/sorting.md
+++ b/Document-Processing/Excel/Spreadsheet/Blazor/sorting.md
@@ -1,22 +1,22 @@
---
layout: post
title: Sorting in Blazor Spreadsheet Component | Syncfusion
-description: Checkout and learn here about sorting functionality in Syncfusion Blazor Spreadsheet component and much more.
+description: Learn how to perform data sorting in the Blazor Spreadsheet component, including multi-column sorting, custom sort orders, and more.
platform: document-processing
-component: Spreadsheet
+control: Spreadsheet
documentation: ug
---
-# Sorting in Blazor Spreadsheet component
+# Sorting in Blazor Spreadsheet Component
-The Blazor Spreadsheet component provides built-in sorting functionality that enables users to organize worksheet data in either ascending or descending order. This support is especially helpful for improving readability and simplifying data analysis by arranging content according to selected columns. The sorting behavior is controlled by the [`AllowSorting`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.SfSpreadsheet.html#Syncfusion_Blazor_Spreadsheet_SfSpreadsheet_AllowSorting) property, which is set to `true` by default. When `AllowSorting` is set to `false`, all sorting options are removed from the interface, including the Ribbon and Context Menu, and related API methods become inactive. Additionally, sorting is disabled if the worksheet is protected. For more information on worksheet protection, refer [here](./protection#protect-sheet).
+The Blazor Spreadsheet component provides built-in sorting functionality that enables users to organize worksheet data in either ascending or descending order. This feature helps improve readability and simplifies data analysis by arranging content according to selected columns. The sorting behavior is controlled by the [`AllowSorting`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.SfSpreadsheet.html#Syncfusion_Blazor_Spreadsheet_SfSpreadsheet_AllowSorting) property, which is set to `true` by default. When `AllowSorting` is set to `false`, all sorting options are removed from the interface, including the Ribbon and Context Menu, and related API methods become inactive. Additionally, sorting is disabled if the worksheet is protected. For more information on worksheet protection, refer to the [worksheet protection documentation](./protection#protect-sheet).
-## Sort operations
+## Sort Operations
-The component supports two types of sort orders that help organize data for easier analysis and presentation:
+The component supports two types of sort orders that help organize data for analysis and presentation:
-* **Ascending** - Arranges data from lowest to highest (A to Z, 0 to 9).
-* **Descending** - Arranges data from highest to lowest (Z to A, 9 to 0).
+* **Ascending**: Arranges data from lowest to highest (e.g., A to Z, 0 to 9).
+* **Descending**: Arranges data from highest to lowest (e.g., Z to A, 9 to 0).
### Sort via UI
@@ -27,14 +27,14 @@ Sorting can be performed through the user interface (UI) using any of the follow
- Select a cell or range of cells to sort.
- Click the **Home** tab in the **Ribbon**.
- Click the **Sort & Filter** icon.
-- Choose either **Ascending** or **Descending** from the dropdown menu.
+- Choose either **Sort Ascending** or **Sort Descending** from the dropdown menu.

**Using the Context Menu**
-- Select a cell or range of cells to sort.
-- Right-click on the selected range to open the context menu.
+- Select a cell or a range of cells to sort.
+- Right-click the selected range to open the context menu.
- Hover over the **Sort** option.
- Select either **Ascending** or **Descending** from the submenu.
@@ -42,20 +42,21 @@ Sorting can be performed through the user interface (UI) using any of the follow
**Using the Filter Dialog**
-If filtering is enabled, sorting can also be performed using the filter dialog. This adds another layer of flexibility by allowing users to sort data directly through the filtered view. For more details on how filtering works in the Blazor Spreadsheet component, refer [here](./filtering).
+If filtering is enabled, sorting can also be performed using the filter dialog. This adds another layer of flexibility by allowing users to sort data directly through the filtered view. For more details on how filtering works in the Blazor Spreadsheet component, refer to the [filtering documentation](./filtering).
+
-- Apply **Filter** to the desired column.
-- Click the filter icon in the column header.
+- Apply a **Filter** to the desired column.
+- Click the filter icon in a column header.
- In the filter dialog, choose either **Sort Ascending** or **Sort Descending**.
-- The sort will be applied to the entire used range based on the selected column.
+- The sort operation is applied to the entire used range based on the selected column.

### Sort by active cell
-When a sort operation is performed without an explicitly selected range, the component automatically identifies the **used range** of the worksheet. The used range includes all contiguous cells that contain data. Sorting is applied to this range using the column of the **active cell** as the sort key.
+When a sort operation is performed without an explicitly selected range, the component automatically identifies the **used range** of the worksheet. The used range includes all contiguous cells that contain data. Sorting is applied to this entire range using the column of the **active cell** as the sort key.
-A **sort key** is the column whose values determine the order of the rows during sorting. It compares the values in this column and rearranges the rows accordingly.
+The **sort key** is the column whose values determine the order of the rows during sorting. It compares the values in this column and rearranges the rows accordingly.
This behavior ensures that the entire dataset is sorted cohesively, preserving row integrity and preventing data misalignment.
@@ -63,9 +64,9 @@ This behavior ensures that the entire dataset is sorted cohesively, preserving r
If the **active cell** is located in **Column C** and no range is selected, it's sorts all rows within the used range based on the values in **Column C**.
-### Sort by selected range
+### Sorting a Selected Range
-When a specific range is selected before initiating a sort operation, the component restricts the sort to the selected range. The column of the active cell within the selected range is used as the sort key. This method allows targeted sorting of a subset of data without affecting the rest of the worksheet.
+When a specific cell range is selected, the sort operation is restricted to that range. The column of the active cell within the selected range is used as the sort key. This method allows for targeted sorting of a subset a data without affecting the rest of the worksheet.
**Example**
@@ -103,8 +104,8 @@ The [SortRangeAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spr
public async Task SortData()
{
- // Sorts the range B2:D5 in ascending order based on values in "Column B".
- await SpreadsheetInstance.SortRangeAsync("B2:D5", SortDirection.Ascending);
+ // Sorts the range B2:D5 in ascending order based on values in "Column B".
+ await SpreadsheetInstance.SortRangeAsync("B2:D5", SortDirection.Ascending);
}
}
diff --git a/Document-Processing/Excel/Spreadsheet/Blazor/undo-redo.md b/Document-Processing/Excel/Spreadsheet/Blazor/undo-redo.md
index 2c2dadbee..bca88d987 100644
--- a/Document-Processing/Excel/Spreadsheet/Blazor/undo-redo.md
+++ b/Document-Processing/Excel/Spreadsheet/Blazor/undo-redo.md
@@ -7,9 +7,17 @@ control: Spreadsheet
documentation: ug
---
-# Undo and Redo in Blazor Spreadsheet component
+# Undo and Redo in Blazor Spreadsheet Component
-The **Undo** and **Redo** functionality in the Blazor Spreadsheet component allows users to easily reverse or reapply recent actions. It maintains a history of spreadsheet operations, encouraging experimentation with data and formatting while preserving the ability to restore previous states. All major operations are supported, including cell editing, formatting, structural changes, and data manipulation. The keyboard shortcuts - **Ctrl + Z** for Undo and **Ctrl + Y** for Redo - provide quick access without interacting with interface elements.
+The **Undo** and **Redo** functionality in the Blazor Spreadsheet component allows users to reverse or reapply recent actions. It maintains a history of spreadsheet operations, encouraging experimentation with data and formatting while preserving the ability to restore previous states.
+
+Undo and Redo are supported for most common operations, including:
+* Cell editing and formatting
+* Structural changes (e.g., inserting or deleting rows/columns)
+* Data manipulation (e.g., sorting and filtering)
+* Resizing rows and columns
+
+The keyboard shortcuts **Ctrl + Z** for Undo and **Ctrl + Y** for Redo provide quick access without requiring interaction with the user interface.
N> The undo and redo history is limited to **25 operations** to optimize memory usage; once this limit is reached, older actions are automatically discarded. Additionally, the history is cleared when worksheet protection is enabled.
@@ -28,9 +36,9 @@ N> The **Undo** button is automatically disabled when there are no reversible op
The **Redo** operation reapplies an action that was previously undone, allowing end users to move forward through the operation history and restore both data and interface states. Redo actions can be performed via the user interface in the following ways:
-* Click the **Redo** button located in the **Home** tab of the **Ribbon** to reapply the most recently undone operation.
-* Use the keyboard shortcut **Ctrl + Y** for quick access to redo the last undone action.
+* Click the **Redo** button located in the **Home** tab of the **Ribbon** to reapply the most recently undone operation.
+* Use the keyboard shortcut **Ctrl + Y** for quick access to redo the last undone action.

-N> The **Redo** button is automatically disabled when no actions are available to reapply or when a cell is in editing mode. Additionally, the redo history is cleared whenever a new action is performed following an undo.
+N> The **Redo** button is automatically disabled when no actions are available to reapply or when a cell is in edit mode. The redo history is cleared whenever a new action is performed after an undo.
diff --git a/Document-Processing/Excel/Spreadsheet/Blazor/worksheet.md b/Document-Processing/Excel/Spreadsheet/Blazor/worksheet.md
index 9d1aa9488..6217effd9 100644
--- a/Document-Processing/Excel/Spreadsheet/Blazor/worksheet.md
+++ b/Document-Processing/Excel/Spreadsheet/Blazor/worksheet.md
@@ -7,29 +7,29 @@ control: Spreadsheet
documentation: ug
---
-# Worksheet in Blazor Spreadsheet component
+# Worksheet Operations in Blazor Spreadsheet Component
A worksheet is a collection of cells organized in the form of rows and columns that allows for storing, formatting, and manipulating data. This feature supports data organization across multiple sheets, making it suitable for scenarios like managing department-wise records, financial reports, or project data in separate sheets.
-N> If the workbook is protected, operations like inserting, deleting, renaming, hiding, unhiding, moving, or duplicating sheets are disabled through both user interface (UI) and code. To know more about workbook protection, refer [here](./protection#protect-workbook).
+N> If a workbook is protected, worksheet operations like inserting, deleting, renaming, hiding, unhiding, moving, or duplicating sheets are disabled through both the user interface (UI) and code. To know more about workbook protection, refer to the [Protect Workbook](./protection#protect-workbook) documentation.
-## Insert sheet
+## Insert Sheet
The Insert sheet feature in the Syncfusion Blazor Spreadsheet component allows adding new sheets to a workbook, enabling better organization of data across multiple sheets. This feature can be accessed through user interface (UI) or programmatically, offering flexibility based on the application's requirements.
-### Insert sheet via UI
+### Insert Sheet via UI
To add or insert a new sheet using the UI, follow these steps:
-* Click the `+` icon button in the **Sheet** tab. This will insert a new empty sheet next to current active sheet.
-
+* Click the `+` icon button in the **Sheet** tab. This will insert a new empty sheet next to current active sheet.
+ 
-* Right click on a **Sheet** tab, and then select **Insert** option from the context menu to insert a new empty sheet after the current active sheet.
-
+* Right-click on a **Sheet** tab, and then select **Insert** option from the context menu to insert a new empty sheet after the current active sheet.
+ 
-### Insert sheet programmatically
+### Insert Sheet Programmatically
-The [InsertSheetAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.SfSpreadsheet.html#Syncfusion_Blazor_Spreadsheet_SfSpreadsheet_InsertSheetAsync_System_Nullable_System_Int32__System_Int32_) method allows adding one or more sheets to a workbook using code. It supports two main scenarios: adding multiple sheets with default names or adding a single sheet with a user-defined name. Below are the details for each scenario, including code examples and parameter information.
+Use the [InsertSheetAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.SfSpreadsheet.html#Syncfusion_Blazor_Spreadsheet_SfSpreadsheet_InsertSheetAsync_System_Nullable_System_Int32__System_Int32_) method to add one or more sheets to a workbook programmatically. It supports two main scenarios: adding multiple sheets with default names or adding a single sheet with a user-defined name. Below are the details for each scenario, including code examples and parameter information.
**Insert multiple sheets at a specific index**
@@ -111,29 +111,29 @@ This method adds one sheet at a specific position with a user-defined name. Each
{% endhighlight %}
{% endtabs %}
-## Delete sheet
+## Delete Sheet
-The Spreadsheet component supports removing sheets from a spreadsheet. When the workbook contains only one sheet, the delete option is disabled in the user interface (UI), and no action occurs during programmatic deletion attempts. Sheets can be deleted using user interface (UI) or programmatically, based on application requirements.
+The Spreadsheet component supports removing sheets from a workbook. When the workbook contains only one sheet, the delete option is disabled in the user interface (UI), and no action occurs during programmatic deletion attempts. Sheets can be deleted using user interface (UI) or programmatically, based on application requirements.
-### Delete sheet via UI
+### Delete Sheet via UI
To remove a sheet using the user interface (UI), follow these steps:
-* Right click on a **Sheet** tab, and then select **Delete** option from context menu.
+1. Right-click a **Sheet** tab, and then select **Delete** option from the context menu.
-
+ 
-* Click **OK** in the confirmation dialog to delete the sheet.
+2. Click **OK** in the confirmation dialog to permanently delete the sheet.
-
+ 
-### Delete sheet programmatically
+### Delete Sheet Programmatically
Sheets can be deleted at a specific index using the [DeleteSheetAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.SfSpreadsheet.html#Syncfusion_Blazor_Spreadsheet_SfSpreadsheet_DeleteSheetAsync_System_Nullable_System_Int32__) method. It supports two main scenarios: delete sheet by index or delete sheet by name. Below are the details for each scenario, including code examples and parameter information.
**Delete sheet by index**
-This method removes a sheet from a specific position. It works best when the sheet location in the workbook is known, such as when removing the first or last sheet through code. If no position is specified, the current active sheet gets deleted.
+This method removes a sheet at a specific index. It works best when the sheet location in the workbook is known, such as when removing the first or last sheet through code. If no position is specified, the current active sheet gets deleted.
| Parameter | Type | Description |
| -- | -- | -- |
@@ -209,21 +209,21 @@ This method removes a sheet that matches the given name. It helps when the exact
{% endhighlight %}
{% endtabs %}
-## Rename sheet
+## Rename Sheet
-The Rename Sheet feature allows assigning user-defined names to sheets for better organization. Sheet names must be unique within the workbook, and renaming does not affect data or formulas. This feature is essential for improving workbook clarity, especially in complex workbooks with multiple sheets.
+The rename sheet feature allows assigning user-defined name to a sheet for better organization. Sheet names must be unique within the workbook, and renaming does not affect data or formulas. This feature is essential for improving workbook clarity, especially in complex workbooks with multiple sheets.
To rename a sheet:
-* Right-click a **Sheet** tab and select **Rename** from the context menu.
+1. Right-click a **Sheet** tab and select **Rename** from the context menu.
-
+ 
-* Enter a new name and click **update** to confirm.
+2. Enter a new name in the dialog and click **Update** to confirm.
-
+ 
-## Hide sheet
+## Hide Sheet
Hiding sheets in the Spreadsheet component prevents unauthorized access or accidental changes. Hidden sheets remain in the workbook, retaining all data, formulas, and functionality, but are not visible in the user interface (UI). To hide a sheet, right-click the **Sheet** tab and select **Hide** from the context menu.
@@ -237,30 +237,30 @@ Hiding sheets in the Spreadsheet component prevents unauthorized access or accid

-## Unhide sheet
+### Unhide Sheet
The Spreadsheet component allows restoring hidden sheets to view, which appear in a disabled state within the sheet selection menu. To make a hidden sheet visible again, click on the **Sheet** tab list icon and then select the hidden sheet. Once selected, the sheet will reappear in the sheet tab collection and become available for editing.

-## Move sheet
+## Move Sheet
The Spreadsheet component allows reordering sheets by moving them to different positions within the workbook. This feature helps organize sheets in a preferred sequence for better navigation and workflow efficiency. Sheets can be moved using user interface (UI) or programmatically, based on application needs.
-### Move sheet via UI
+### Move Sheet via UI
To move a sheet using the user interface (UI), follow these steps:
-* Click and hold on a **Sheet** tab, then drag it to the desired position.
+* Click and hold on a **Sheet** tab, then drag it to the desired position.
-* Right click on a **Sheet** tab and select **Move Left** or **Move Right** options from the context menu to reposition the sheet accordingly.
+* Right-click on a **Sheet** tab and select **Move Left** or **Move Right** options from the context menu to reposition the sheet accordingly.
N> **Move Right** is enabled only if a sheet exists to the right, and **Move Left** is enabled only if a sheet exists to the left.


-### Move sheet programmatically
+### Move Sheet Programmatically
The [MoveSheetAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.SfSpreadsheet.html#Syncfusion_Blazor_Spreadsheet_SfSpreadsheet_MoveSheetAsync_System_Nullable_System_Int32__System_Int32_) method moves a sheet from one index to another programmatically. This method requires two parameters: the current zero-based index of the sheet to move and the destination zero-based index where the sheet will be placed. If either index is invalid (negative or beyond the sheet count), the method will not perform any action.
@@ -300,19 +300,19 @@ The [MoveSheetAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spr
{% endhighlight %}
{% endtabs %}
-## Duplicate sheet
+## Duplicate Sheet
The Spreadsheet component allows creating an exact copy of a sheet, including all data, formatting, formulas, and styling. Duplicating a sheet is useful for creating multiple sheets with similar content or structure. The duplicated sheet is inserted immediately after the original sheet and is assigned a unique name, typically appending a number (e.g., "Sheet1" becomes "Sheet1 (2)"). Sheet duplication can be performed through user interface (UI) or programmatically, depending on application needs.
-### Duplicate sheet via UI
+### Duplicate Sheet via UI
To duplicate a sheet using the user interface (UI), simply right-click on the desired **Sheet** tab and choose the **Duplicate** option from the context menu.

-### Duplicate sheet programmatically
+### Duplicate Sheet Programmatically
-The [DuplicateSheetAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.SfSpreadsheet.html#Syncfusion_Blazor_Spreadsheet_SfSpreadsheet_DuplicateSheetAsync_System_Nullable_System_Int32__) method allows duplicating a sheet programmatically by specifying its index or name. The duplicated sheet is inserted immediately after the original sheet. Below are details for duplicating a sheet by index or by name, including parameter information and code examples.
+Use the [DuplicateSheetAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Spreadsheet.SfSpreadsheet.html#Syncfusion_Blazor_Spreadsheet_SfSpreadsheet_DuplicateSheetAsync_System_Nullable_System_Int32__) method to duplicate a worksheet programmatically by specifying its index or name. The duplicated sheet is inserted immediately after the original sheet. Below are details for duplicating a sheet by index or by name, including parameter information and code examples.
**Duplicate sheet by index**
@@ -359,7 +359,7 @@ This method creates a copy of the sheet with the specified name. The sheet name
| Parameter | Type | Description |
| -- | -- | -- |
-| sheetName | string | The name of the sheet to duplicate. If the name does not exist, no action occurs. |
+| `sheetName` | `string` | The name of the sheet to duplicate. If the name does not exist, no action occurs. |
{% tabs %}
{% highlight razor %}
@@ -384,10 +384,10 @@ This method creates a copy of the sheet with the specified name. The sheet name
public async Task DuplicateSheetHandler()
{
- // Duplicate the sheet named "Sheet1".
+ // Duplicates the sheet named "Sheet1".
await SpreadsheetRef.DuplicateSheetAsync("Sheet1");
}
}
{% endhighlight %}
-{% endtabs %}
\ No newline at end of file
+{% endtabs %}
diff --git a/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/Assemblies-Required.md b/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/Assemblies-Required.md
deleted file mode 100644
index ce6960b7c..000000000
--- a/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/Assemblies-Required.md
+++ /dev/null
@@ -1,80 +0,0 @@
----
-title: Assemblies Required for HTML to PDF | Syncfusion
-description: This section details the Syncfusion assemblies required to implement HTML-to-PDF conversion functionality using the .NET PDF library.
-platform: document-processing
-control: PDF
-documentation: UG
-keywords: Assemblies
----
-# Assemblies Required for HTML to PDF Conversion
-
-Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for [Windows](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/advanced-installation#windows), [Linux](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/advanced-installation#linux), and [Mac](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/advanced-installation#mac) respectively. Please refer to the [advanced installation](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/advanced-installation) steps for more details.
-
-
-
-
-
Platforms
-
Assemblies
-
-
-
-
-
- WinForms
- WPF
- ASP.NET MVC
-
-
-
-
Syncfusion.Compression.Base.dll
-
Syncfusion.Pdf.Base.dll
-
Syncfusion.HtmlConverter.Base.dll
-
Newtonsoft.Json package (v13.0.1 or above)
-
-
-
-
-
- .NET/.NET Core
- Blazor
-
-
-
-
Syncfusion.Compression.Portable.dll
-
Syncfusion.Pdf.Portable.dll
-
Syncfusion.HtmlConverter.Portable.dll
-
Newtonsoft.Json package (v13.0.1 or above)
-
-
-
-
-
-
-**RETIRED PRODUCTS**
-
-
-
-
-
Platform(s)
-
Assembly
-
-
-
-
-
- ASP.NET
-
-
-
-
Syncfusion.Compression.Base.dll
-
Syncfusion.Pdf.Base.dll
-
Syncfusion.HtmlConverter.Base.dll
-
Newtonsoft.Json package (v13.0.1 or above)
-
-
-
-
-
-
-N> HTML to PDF conversion is not supported in .NET MAUI, Xamarin, and UWP applications.
-
diff --git a/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/Convert-HTML-to-PDF-in-AWS-Elastic-Beanstalk.md b/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/Convert-HTML-to-PDF-in-AWS-Elastic-Beanstalk.md
index 8f55df2c7..fd162f171 100644
--- a/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/Convert-HTML-to-PDF-in-AWS-Elastic-Beanstalk.md
+++ b/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/Convert-HTML-to-PDF-in-AWS-Elastic-Beanstalk.md
@@ -71,8 +71,6 @@ public IActionResult BlinkToPDF()
MemoryStream stream = new MemoryStream();
//Save the document to the memory stream.
document.Save(stream);
- //Close the document
- document.Close(true);
return File(stream.ToArray(), System.Net.Mime.MediaTypeNames.Application.Pdf, "BlinkLinuxDockerAWSBeanstalk.pdf");
}
diff --git a/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/Convert-HTML-to-PDF-in-Azure-App-Service-Linux-with-docker.md b/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/Convert-HTML-to-PDF-in-Azure-App-Service-Linux-with-docker.md
index d75a84e1f..d65215daf 100644
--- a/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/Convert-HTML-to-PDF-in-Azure-App-Service-Linux-with-docker.md
+++ b/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/Convert-HTML-to-PDF-in-Azure-App-Service-Linux-with-docker.md
@@ -84,7 +84,6 @@ public ActionResult ExportToPDF()
MemoryStream stream = new MemoryStream();
//Save and close a PDF document.
document.Save(stream);
- document.Close(true);
return File(stream.ToArray(), System.Net.Mime.MediaTypeNames.Application.Pdf, "URL_to_PDF.pdf");
}
diff --git a/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/Convert-HTML-to-PDF-in-Azure-App-Service-Windows.md b/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/Convert-HTML-to-PDF-in-Azure-App-Service-Windows.md
new file mode 100644
index 000000000..ddacaba2e
--- /dev/null
+++ b/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/Convert-HTML-to-PDF-in-Azure-App-Service-Windows.md
@@ -0,0 +1,138 @@
+---
+title: Convert HTML to PDF in Azure App Service on Windows | Syncfusion
+description: Convert HTML to PDF in Azure App Service on Windows using Syncfusion .NET Core HTML to PDF converter library.
+platform: document-processing
+control: PDF
+documentation: UG
+---
+
+# Convert HTML to PDF file in Azure App Service on Windows
+
+As the Azure Windows platform is a Sandbox environment, the default HTML rendering engine Blink used in our HTML to PDF conversion is incompatible due to GDI Limitations. It is recommended that you use [Azure web applications in the Linux container.](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/convert-html-to-pdf-in-azure-app-service-linux) For converting HTML to PDF in Azure Windows, you can use our [CefSharp](https://www.nuget.org/packages/CefSharp.OffScreen.NETCore/119.4.30) based HTML converter if is fit your requirement.
+
+N> [CefSharp](https://www.nuget.org/packages/CefSharp.OffScreen.NETCore/119.4.30) is an open-source library that comes under the [BSD](https://github.com/cefsharp/CefSharp/blob/master/README.md) license.
+
+
+## Steps to convert HTML to PDF file in Azure App Service on Windows using CefSharp
+
+Step 1: Create a new ASP.NET Core Web App (Model-View-Controller).
+
+
+Step 2: Create a project name and select the location.
+
+
+Step 3: Click **Create**.
+
+
+Step 4: Install the [Syncfusion.HtmlToPdfConverter.Cef.Net.Windows](https://www.nuget.org/packages/Syncfusion.HtmlToPdfConverter.Cef.Net.Windows) NuGet package to reference your project using the [nuget.org](https://www.nuget.org/).
+
+
+N> Starting with v16.2.0.x, if you reference Syncfusion® assemblies from the trial setup or NuGet feed, you also have to add the "Syncfusion.Licensing" assembly reference and include a license key in your projects. Please refer to this [link](https://help.syncfusion.com/common/essential-studio/licensing/overview) to learn about registering the Syncfusion® license key in your application to use our components.
+
+Step 5: A default action method named Index will be present in *HomeController.cs*. Right-click on the Index method and select **Go To View**, where you will be directed to its associated view page *Index.cshtml*. Add a new button in the *Index.cshtml* as follows.
+
+{% tabs %}
+{% highlight c# tabtitle="C#" %}
+
+@{
+ Html.BeginForm("ConvertToPdf", "Home", FormMethod.Get);
+ {
+
+
+
+ }
+ Html.EndForm();
+}
+
+{% endhighlight %}
+{% endtabs %}
+
+Step 6: Include the following namespaces in *HomeController.cs*.
+
+{% tabs %}
+{% highlight c# tabtitle="C#" %}
+
+ using Syncfusion.HtmlConverter;
+ using Syncfusion.Pdf;
+
+{% endhighlight %}
+{% endtabs %}
+
+Step 7: Add a new action method named ConvertToPdf in the HomeController.cs file and include the following code example to convert HTML to PDF document in *HomeController.cs*.
+
+{% tabs %}
+{% highlight c# tabtitle="C#" %}
+
+ public IActionResult ConvertToPdf()
+ {
+ //Initialize HTML to PDF converter.
+ HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(HtmlRenderingEngine.Cef);
+ CefConverterSettings cefConverterSettings = new CefConverterSettings();
+ //Set Blink viewport size.
+ cefConverterSettings.ViewPortSize = new Syncfusion.Drawing.Size(1280, 0);
+ //Assign Blink converter settings to HTML converter.
+ htmlConverter.ConverterSettings = cefConverterSettings;
+ //Convert URL to PDF document.
+ PdfDocument document = htmlConverter.Convert("https://www.google.com");
+ //Create memory stream.
+ MemoryStream stream = new MemoryStream();
+ //Save and close the document.
+ document.Save(stream);
+ document.Close();
+ return File(stream.ToArray(), System.Net.Mime.MediaTypeNames.Application.Pdf, "HTML-to-PDF.pdf");
+ }
+
+
+{% endhighlight %}
+{% endtabs %}
+
+Step 8: Refer the steps to [publish](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/convert-html-to-pdf-in-azure-app-service-windows#steps-to-publish-as-azure-app-service-on-windows) as Azure App Service on Windows
+
+Step 9: Open the created web app service in the Azure portal. Go to Settings -> Configuration -> Platform settings and change the platform to 64-bit.
+
+
+Step 10: After completing the publish profile setup, click the publish.
+
+Step 11: Publish will be succeeded and the published webpage will open in the browser. Click ExportToPDF button to perform the conversion.
+
+You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/html-to-pdf-csharp-examples/tree/master/Azure/HTML-to-PDF-Azure%20App%20Service-Windows-CefSharp).
+
+
+## Steps to publish as Azure App Service on Windows
+
+Step 1: Right-click the project and select the **Publish** option.
+
+
+Step 2: Click **Add a Publish Profile**.
+
+
+Step 3: Select the publish target as **Azure**.
+
+
+Step 4: Select the Specific target as **Azure App Service (Windows)**.
+
+
+Step 5: Click the **Create new** option to create a new app service.
+
+
+Step 6: Click **Create** to proceed with **App Service** creation.
+
+
+Step 7: Click **Finish** to finalize the **App Service** creation.
+
+
+Step 8: Click **Close**.
+
+
+Step 9: Click **Publish**.
+
+
+Step 10: Now, Publish has succeeded.
+
+
+Step 11: Now, the published webpage will open in the browser.
+
+
+Step 12: Select a PDF document and click **Export to PDF** to create a PDF document. You will get the output PDF document as follows.
+
+
diff --git a/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/Convert-HTML-to-PDF-in-Azure-Functions-Windows.md b/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/Convert-HTML-to-PDF-in-Azure-Functions-Windows.md
new file mode 100644
index 000000000..532206ff4
--- /dev/null
+++ b/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/Convert-HTML-to-PDF-in-Azure-Functions-Windows.md
@@ -0,0 +1,142 @@
+---
+title: Convert HTML to PDF in Azure Functions on Windows | Syncfusion
+description: Convert HTML to PDF in Azure Functions on Windows using Syncfusion .NET Core HTML to PDF converter library.
+platform: document-processing
+control: PDF
+documentation: UG
+---
+
+# Convert HTML to PDF file in Azure Functions on Windows
+
+As the Azure Windows platform is a Sandbox environment, the default HTML rendering engine Blink used in our HTML to PDF conversion is incompatible due to GDI Limitations. It is recommended that you use [Azure functions in Linux](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/convert-html-to-pdf-in-azure-functions-linux) For converting HTML to PDF in Azure Functions on Windows, you can use our [CefSharp](https://www.nuget.org/packages/CefSharp.OffScreen.NETCore/119.4.30) based HTML converter if is fit your requirement.
+
+N> [CefSharp](https://www.nuget.org/packages/CefSharp.OffScreen.NETCore/119.4.30) is an open-source library that comes under the [BSD](https://github.com/cefsharp/CefSharp/blob/master/README.md) license.
+
+
+## Steps to convert HTML to PDF file in Azure Functions on Windows using CefSharp
+
+Step 1: Create the Azure functions project.
+
+
+Step 2: Create a project name and select the location.
+
+
+Step 3: Select the function worker as .NET 8.0 isolated (Long-term support), and the selected HTTP triggers as follows.
+
+
+N> We have ensured the conversion in Azure functions isolated app and the conversion supports Azure functions isolated app only. The normal Azure Function app has a limitation of copying the runtime files at publish.
+
+Step 4: Install the [Syncfusion.HtmlToPdfConverter.Cef.Net.Windows](https://www.nuget.org/packages/Syncfusion.HtmlToPdfConverter.Cef.Net.Windows) NuGet package to reference your project using the [nuget.org](https://www.nuget.org/).
+
+
+N> Starting with v16.2.0.x, if you reference Syncfusion® assemblies from the trial setup or NuGet feed, you also have to add the "Syncfusion.Licensing" assembly reference and include a license key in your projects. Please refer to this [link](https://help.syncfusion.com/common/essential-studio/licensing/overview) to learn about registering the Syncfusion® license key in your application to use our components.
+
+Step 5: Include the following namespaces in the **Function1.cs** file.
+
+{% tabs %}
+{% highlight c# tabtitle="C#" %}
+
+ using Syncfusion.HtmlConverter;
+ using Syncfusion.Pdf;
+ using Syncfusion.Pdf.Graphics;
+
+{% endhighlight %}
+{% endtabs %}
+
+Step 6: Add the following code example in the **Run** method of the **Function1** class to **convert HTML to PDF document** in Azure Functions and return the resultant **PDF document**.
+
+{% tabs %}
+{% highlight c# tabtitle="C#" %}
+
+ [Function("Function1")]
+
+ public IActionResult Run([HttpTrigger(AuthorizationLevel.Anonymous, "get", "post")] HttpRequest req)
+ {
+ string blinkBinariesPath = string.Empty;
+ MemoryStream ms = null;
+ try
+ {
+
+ //Initialize the HTML to PDF converter with the Blink rendering engine.
+ HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(HtmlRenderingEngine.Cef);
+ //Convert URL to PDF
+ PdfDocument document = htmlConverter.Convert("https://www.google.com/");
+
+ ms = new MemoryStream();
+ //Save and close the PDF document
+ document.Save(ms);
+ document.Close();
+ }
+ catch (Exception ex)
+ {
+ //Create a new PDF document.
+ PdfDocument document = new PdfDocument();
+ //Add a page to the document.
+ PdfPage page = document.Pages.Add();
+
+ //Create PDF graphics for the page.
+ PdfGraphics graphics = page.Graphics;
+ //Set the standard font.
+ PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 20);
+ //Draw the text.
+ graphics.DrawString(ex.Message, font, PdfBrushes.Black, new Syncfusion.Drawing.PointF(0, 0));
+
+ //Creating the stream object.
+ ms = new MemoryStream();
+ //Save the document into memory stream.
+ document.Save(ms);
+ //Close the document.
+ document.Close(true);
+
+ }
+ ms.Position = 0;
+ return new FileStreamResult(ms, "application/pdf");
+ }
+
+{% endhighlight %}
+{% endtabs %}
+
+Step 7: Refer the steps to [publish](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/convert-html-to-pdf-in-azure-functions-windows#steps-to-publish-as-azure-function-on-windows) as Azure Function on Windows.
+
+Step 8: After publish open the created web app service in the Azure portal. Go to Settings -> Configuration -> Platform settings and change the platform to 64-bit.
+
+
+
+You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/html-to-pdf-csharp-examples/tree/master/Azure/HTML-to-PDF-Azure-Function-Windows-CefSharp).
+
+
+## Steps to publish as Azure Function on Windows
+
+Step 1: Right-click the project and select Publish. Then, create a new profile in the Publish Window.
+
+
+Step 2: Select the target as **Azure** and click **Next**.
+
+
+Step 3: Select the **Azure Function App (Windows)** and click **Next**.
+
+
+Step 4: Select the **Create new**.
+
+
+Step 5: Click **Create**.
+
+
+Step 6: After creating the function app service, click **Finish**.
+
+
+Step 7: Click deployment type.
+
+
+Step 8: Click **Close** button.
+
+
+Step 9: Click **Publish**.
+
+
+Step 10: Now, Publish has succeeded.
+
+
+Step 11: Now, go to the Azure portal and select App Services. After running the service, click **Get function URL > Copy**. Include the URL as a query string in the URL. Then, paste it into a new browser tab. You will get a PDF document as follows.
+
+
diff --git a/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/Converting-HTML-to-PDF.md b/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/Converting-HTML-to-PDF.md
index 9d5775c35..bb47d6e8e 100644
--- a/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/Converting-HTML-to-PDF.md
+++ b/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/Converting-HTML-to-PDF.md
@@ -5,7 +5,7 @@ platform: document-processing
control: PDF
documentation: UG
---
-# Converting HTML to a PDF Document
+# Converting HTML to PDF
The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.
@@ -16,14 +16,14 @@ Syncfusion® HTML-to-PDF converter will work seamlessly in various
* Converts any [webpage to PDF](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/features#url-to-pdf).
* Converts any raw [HTML string to PDF](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/features#html-string-to-pdf).
* Converts [HTML form to fillable PDF form](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/features#html-form-to-pdf-form).
-* Automatically creates [Table of Contents](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/features#table-of-contents-with-custom-style).
+* Automatically creates [Table of Contents](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/features#table-of-contents).
* Automatically creates [bookmark hierarchy](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/features#bookmarks).
* Converts only a [part of the web page to PDF](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/features#partial-webpage-to-pdf).
-* Supports PDF [header and PDF footer](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/features#header-and-footer).
+* Supports PDF header and PDF footer.
* Repeats HTML table header and footer in PDF.
* Supports HTML5, CSS3, SVG, and Web fonts.
* Converts any [HTML to an image](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/features#url-to-image).
-* Converts any [SVG to image](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/features#svg-file-to-image).
+* Converts any [SVG to image](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/features#url-to-image).
* Supports accessing HTML pages using both [HTTP POST and GET](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/features#http-get-and-post).
* Supports [cookies-based form authentication](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/features#form-authentication).
* Thread safe.
@@ -33,6 +33,146 @@ Syncfusion® HTML-to-PDF converter will work seamlessly in various
* Compatible with .NET Framework 4.5 and above.
* Compatible with .NET Core 2.0 and above.
+## Install HTML to PDF .NET library to your project
+
+Include the HTML to PDF converter in your project using two approaches.
+* NuGet packages (Recommended)
+* Assemblies.
+
+### NuGet Packages Required (Recommended)
+
+Directly install the NuGet packages to your .NET application from [nuget.org](https://www.nuget.org/).
+
+N> The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.
+
+
+
+Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.
+
+
+
+### Assemblies Required
+
+Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for [Windows](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/advanced-installation#windows), [Linux](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/advanced-installation#linux), and [Mac](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/advanced-installation#mac), respectively. Please refer to the [advanced installation](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/advanced-installation) steps for more details.
+
+
+
+
+
+Platforms
+
+Assemblies
+
+
+
+
+
+WinForms
+WPF
+ASP.NET
+ASP.NET MVC
+
+
+
+
Syncfusion.Compression.Base.dll
+
Syncfusion.Pdf.Base.dll
+
Syncfusion.HtmlConverter.Base.dll
+
Newtonsoft.Json package (v13.0.1 or above)
+
+
+
+
+.NET/.NET Core
+Blazor
+
+
+
+
Syncfusion.Compression.Portable.dll
+
Syncfusion.Pdf.Portable.dll
+
Syncfusion.HtmlConverter.Portable.dll
+
Newtonsoft.Json package (v13.0.1 or above)
+
+
+
+
## Get Started with HTML to PDF conversion
### Convert HTML to PDF in C#
@@ -73,9 +213,10 @@ blinkConverterSettings.ViewPortSize = new Syncfusion.Drawing.Size(1280, 0);
htmlConverter.ConverterSettings = blinkConverterSettings;
//Convert URL to PDF document.
PdfDocument document = htmlConverter.Convert("https://www.syncfusion.com");
-
+//Create a filestream.
+FileStream fileStream = new FileStream("HTML-to-PDF.pdf", FileMode.CreateNew, FileAccess.ReadWrite);
//Save and close the PDF document.
-document.Save("Output.pdf");
+document.Save(fileStream);
document.Close(true);
{% endhighlight %}
diff --git a/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/NuGet-Packages-Required.md b/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/NuGet-Packages-Required.md
deleted file mode 100644
index cfd5f00b6..000000000
--- a/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/NuGet-Packages-Required.md
+++ /dev/null
@@ -1,112 +0,0 @@
----
-title: NuGet Packages for HTML to PDF | Syncfusion
-description: This section outlines the NuGet packages required to perform HTML to PDF conversion using the Syncfusion PDF library across various platforms
-platform: document-processing
-control: PDF
-documentation: UG
----
-# NuGet Packages Required for HTML to PDF
-
-For converting HTML to PDF file, the following NuGet packages need to to be installed in your .NET application from [nuget.org](https://www.nuget.org/).
-
-N> The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.
-
-
-
-Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.
-
-
-
-N> 1. HTML to PDF conversion is not supported in .NET MAUI, Xamarin, and UWP applications.
-N> 2. Starting with v21.1.XX, The package structure is changed if you reference Syncfusion® HTML to the PDF library from the NuGet feed. The Blink binaries paths are automatically added and do not need to add it manually. However, if you need to refer the blink binaries paths in your application manually, please use the BlinkPath in BlinkConverterSettings. Get the BlinkBinaries from the NuGet package runtime folder or get the binaries by installing the HTML converter installer.
\ No newline at end of file
diff --git a/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/aspnet-mvc.md b/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/aspnet-mvc.md
index 0883c3b6b..eaa385228 100644
--- a/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/aspnet-mvc.md
+++ b/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/aspnet-mvc.md
@@ -67,8 +67,6 @@ PdfDocument document = htmlConverter.Convert("https://www.syncfusion.com");
MemoryStream stream = new MemoryStream();
//Save the document to memory stream.
document.Save(stream);
-//Close the document
-document.Close(true);
return File(stream.ToArray(), System.Net.Mime.MediaTypeNames.Application.Pdf, "HTML-to-PDF.pdf");
{% endhighlight %}
diff --git a/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/blazor.md b/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/blazor.md
index f278dc919..8fc598841 100644
--- a/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/blazor.md
+++ b/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/blazor.md
@@ -1,19 +1,19 @@
---
-title: Convert HTML to PDF in Blazor | Syncfusion
-description: Learn how to convert an HTML to PDF file in a Blazor application using the Syncfusion .NET HTML to PDF converter library with step-by-step guidance.
+title: Convert a HTML to PDF file in Blazor | Syncfusion
+description: Learn how to convert a HTML to PDF file in Blazor with easy steps using Syncfusion .NET HTML converter library.
platform: document-processing
control: PDF
documentation: UG
keywords: Assemblies
---
-# Convert HTML to PDF in Blazor
+# Convert HTML to PDF file in Blazor
-The Syncfusion® HTML to PDF converter is a .NET library for converting HTML content or web pages to PDF documents within Blazor applications. This guide details the process for Blazor Server applications.
+The Syncfusion® HTML to PDF converter is a .NET library used to convert HTML or web pages to PDF document in Blazor application.
-N> The HTML to PDF converter is supported in Blazor Server applications. For Blazor WebAssembly (WASM), conversion must be handled on a server due to platform limitations.
+N> Currently, HTML to PDF converter is mainly supported in Blazor Server-Side, while it is not compatible with Blazor WASM (WebAssembly).
-## Steps to convert an HTML to a PDF file in a Blazor application
+## Steps to convert HTML to PDF in Blazor application
{% tabcontents %}
@@ -24,18 +24,18 @@ N> The HTML to PDF converter is supported in Blazor Server applications. For Bla
* Install .NET SDK: Ensure that you have the .NET SDK installed on your system. You can download it from the [.NET Downloads page](https://dotnet.microsoft.com/en-us/download).
* Install Visual Studio: Download and install Visual Studio Code from the [official website](https://code.visualstudio.com/download).
-**Step 1**: Create a new C# Blazor project. Select the **Blazor Web App** template.
-
+Step 1: Create a new C# Blazor Server application project. Select Blazor App from the template and click the Next button.
+
-**Step 2**: Configure the project. Set the **Interactive render mode** to `Server`.
-
+In the project configuration window, name your project and select Create.
+
-**Step 3**: Install the [Syncfusion.HtmlToPdfConverter.Net.Windows](https://www.nuget.org/packages/Syncfusion.HtmlToPdfConverter.Net.Windows/) NuGet package as a reference to the project.
+Step 2: Install the [Syncfusion.HtmlToPdfConverter.Net.Windows](https://www.nuget.org/packages/Syncfusion.HtmlToPdfConverter.Net.Windows/) NuGet package as a reference to your Blazor Server application from [NuGet.org](https://www.nuget.org/).

-N> Starting with v16.2.0.x, if referencing Syncfusion® assemblies from trial setup or from the NuGet feed, add "Syncfusion.Licensing" assembly reference and include a license key in projects. Refer to this [link](https://help.syncfusion.com/common/essential-studio/licensing/overview) to learn about registering Syncfusion® license key in applications to use the components.
+N> Starting with v16.2.0.x, if you reference Syncfusion® assemblies from trial setup or from the NuGet feed, you also have to add "Syncfusion.Licensing" assembly reference and include a license key in your projects. Please refer to this [link](https://help.syncfusion.com/common/essential-studio/licensing/overview) to know about registering Syncfusion® license key in your application to use our components.
-**Step 4**: Create a new class file named `ExportService.cs` in the `Data` folder and add the following namespaces.
+Step 3: Create a new class file named ExportService under Data folder and include the following namespaces in the file.
{% highlight c# tabtitle="C#" %}
@@ -45,7 +45,7 @@ using System.IO;
{% endhighlight %}
-**Step 5**: Add the following code to convert HTML to PDF document in ExportService class using [Convert](https://help.syncfusion.com/cr/document-processing/Syncfusion.HtmlConverter.HtmlToPdfConverter.html#Syncfusion_HtmlConverter_HtmlToPdfConverter_Convert_System_String_) method in [HtmlToPdfConverter](https://help.syncfusion.com/cr/document-processing/Syncfusion.HtmlConverter.HtmlToPdfConverter.html) class.
+Step 4: Add the following code to convert HTML to PDF document in ExportService class using [Convert](https://help.syncfusion.com/cr/document-processing/Syncfusion.HtmlConverter.HtmlToPdfConverter.html#Syncfusion_HtmlConverter_HtmlToPdfConverter_Convert_System_String_) method in [HtmlToPdfConverter](https://help.syncfusion.com/cr/document-processing/Syncfusion.HtmlConverter.HtmlToPdfConverter.html) class.
{% highlight c# tabtitle="C#" %}
@@ -59,14 +59,13 @@ public MemoryStream CreatePdf(string url)
MemoryStream stream = new MemoryStream();
//Save the document to memory stream.
document.Save(stream);
- //Close the document
- document.Close(true);
return stream;
}
{% endhighlight %}
-**Step 6**: Register your service in the `ConfigureServices` method available in the `Startup.cs` class as follows.
+Step 5: Register your service in the ConfigureServices method available in the Startup.cs class as follows.
+
{% highlight c# tabtitle="C#" %}
///
@@ -82,7 +81,7 @@ public void ConfigureServices(IServiceCollection services)
{% endhighlight %}
-**Step 7**: Inject ExportService into `FetchData.razor` using the following code.
+Step 6: Inject ExportService into FetchData.razor using the following code.
{% highlight c# tabtitle="C#" %}
@@ -93,7 +92,7 @@ public void ConfigureServices(IServiceCollection services)
{% endhighlight %}
-**Step 8**: Create a button in the `FetchData.razor` using the following code.
+Step 7: Create a button in the FetchData.razor using the following code.
{% highlight c# tabtitle="C#" %}
@@ -101,7 +100,7 @@ public void ConfigureServices(IServiceCollection services)
{% endhighlight %}
-**Step 9**: Add the `ExportToPdf` method in `FetchData.razor` page to call the export service.
+Step 8: Add the ExportToPdf method in FetchData.razor page to call the export service.
{% highlight c# tabtitle="C#" %}
@@ -133,7 +132,7 @@ public void ConfigureServices(IServiceCollection services)
{% endhighlight %}
-**Step 10**: Create a class file with FileUtil name and add the following code to invoke the JavaScript action to download the file in the browser.
+Step 9: Create a class file with FileUtil name and add the following code to invoke the JavaScript action to download the file in the browser.
{% highlight c# tabtitle="C#" %}
@@ -148,7 +147,7 @@ public static class FileUtil
{% endhighlight %}
-**Step 11**: Add the following JavaScript function in the _Host.cshtml available under the Pages folder.
+Step 10: Add the following JavaScript function in the _Host.cshtml available under the Pages folder.
{% highlight c# tabtitle="C#" %}
@@ -181,7 +180,13 @@ public static class FileUtil
{% endhighlight %}
-**Step 12**: Build and run the project by pressing `F5` or by selecting **Debug > Start Debugging**.
+Step 11: Build the project.
+
+Click on Build > Build Solution or press Ctrl + Shift + B to build the project.
+
+Step 12: Run the project.
+
+Click the Start button (green arrow) or press F5 to run the app.
{% endtabcontent %}
@@ -193,25 +198,26 @@ public static class FileUtil
* Install Visual Studio Code: Download and install Visual Studio Code from the [official website](https://code.visualstudio.com/download).
* Install C# Extension for VS Code: Open Visual Studio Code, go to the Extensions view (Ctrl+Shift+X), and search for 'C#'. Install the official [C# extension provided by Microsoft](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp).
-**Step 1**: Create a new Blazor Server application using the terminal.
+Step 1: Open the terminal (Ctrl+` ) and run the following command to create a new Blazor Server application
-```bash
-dotnet new blazor -n CreatePdfBlazorApp --interactivity Server
```
+dotnet new blazorserver -n CreatePdfBlazorServerApp
+```
+Step 2: Replace ****CreatePdfBlazorServerApp** with your desired project name.
-**Step 2**: Navigate to the project directory.
+Step 3: Navigate to the project directory using the following command
-```bash
-cd CreatePdfBlazorApp
```
-**Step 3**: Use the following command in the terminal to add the [Syncfusion.HtmlToPdfConverter.Net.Windows](https://www.nuget.org/packages/Syncfusion.HtmlToPdfConverter.Net.Windows/) NuGet package.
+cd CreatePdfBlazorServerApp
+```
+Step 4: Use the following command in the terminal to add the [Syncfusion.HtmlToPdfConverter.Net.Windows](https://www.nuget.org/packages/Syncfusion.HtmlToPdfConverter.Net.Windows/) package to your project.
-```bash
+```
dotnet add package Syncfusion.HtmlToPdfConverter.Net.Windows
```
-N> Starting with v16.2.0.x, if referencing Syncfusion® assemblies from trial setup or from the NuGet feed, add "Syncfusion.Licensing" assembly reference and include a license key in projects. Refer to this [link](https://help.syncfusion.com/common/essential-studio/licensing/overview) to learn about registering Syncfusion® license key in applications to use the components.
+N> Starting with v16.2.0.x, if you reference Syncfusion® assemblies from trial setup or from the NuGet feed, you also have to add "Syncfusion.Licensing" assembly reference and include a license key in your projects. Please refer to this [link](https://help.syncfusion.com/common/essential-studio/licensing/overview) to know about registering Syncfusion® license key in your application to use our components.
-**Step 4**: Create a new class file named `ExportService.cs` under Data folder and include the following namespaces in the file.
+Step 5: Create a new class file named ExportService under Data folder and include the following namespaces in the file.
{% highlight c# tabtitle="C#" %}
@@ -221,7 +227,7 @@ using System.IO;
{% endhighlight %}
-**Step 5**: Add the following code to convert HTML to PDF document in ExportService class using [Convert](https://help.syncfusion.com/cr/document-processing/Syncfusion.HtmlConverter.HtmlToPdfConverter.html#Syncfusion_HtmlConverter_HtmlToPdfConverter_Convert_System_String_) method in [HtmlToPdfConverter](https://help.syncfusion.com/cr/document-processing/Syncfusion.HtmlConverter.HtmlToPdfConverter.html) class.
+Step 6: Add the following code to convert HTML to PDF document in ExportService class using [Convert](https://help.syncfusion.com/cr/document-processing/Syncfusion.HtmlConverter.HtmlToPdfConverter.html#Syncfusion_HtmlConverter_HtmlToPdfConverter_Convert_System_String_) method in [HtmlToPdfConverter](https://help.syncfusion.com/cr/document-processing/Syncfusion.HtmlConverter.HtmlToPdfConverter.html) class.
{% highlight c# tabtitle="C#" %}
@@ -235,14 +241,12 @@ public MemoryStream CreatePdf(string url)
MemoryStream stream = new MemoryStream();
//Save the document to memory stream.
document.Save(stream);
- //Close the document
- document.Close(true);
return stream;
}
{% endhighlight %}
-**Step 6**: Register your service in the ConfigureServices method available in the Startup.cs class as follows.
+Step 7: Register your service in the ConfigureServices method available in the Startup.cs class as follows.
{% highlight c# tabtitle="C#" %}
@@ -259,7 +263,7 @@ public void ConfigureServices(IServiceCollection services)
{% endhighlight %}
-**Step 7**: Inject ExportService into FetchData.razor using the following code.
+Step 8: Inject ExportService into FetchData.razor using the following code.
{% highlight c# tabtitle="C#" %}
@@ -270,7 +274,7 @@ public void ConfigureServices(IServiceCollection services)
{% endhighlight %}
-**Step 8**: Create a button in the FetchData.razor using the following code.
+Step 9: Create a button in the FetchData.razor using the following code.
{% highlight c# tabtitle="C#" %}
@@ -278,7 +282,7 @@ public void ConfigureServices(IServiceCollection services)
{% endhighlight %}
-**Step 9**: Add the ExportToPdf method in FetchData.razor page to call the export service.
+Step 10: Add the ExportToPdf method in FetchData.razor page to call the export service.
{% highlight c# tabtitle="C#" %}
@@ -310,7 +314,7 @@ public void ConfigureServices(IServiceCollection services)
{% endhighlight %}
-**Step 10**: Create a class file with FileUtil name and add the following code to invoke the JavaScript action to download the file in the browser.
+Step 11: Create a class file with FileUtil name and add the following code to invoke the JavaScript action to download the file in the browser.
{% highlight c# tabtitle="C#" %}
@@ -325,7 +329,7 @@ public static class FileUtil
{% endhighlight %}
-**Step 11**: Add the following JavaScript function in the _Host.cshtml available under the Pages folder.
+Step 12: Add the following JavaScript function in the _Host.cshtml available under the Pages folder.
{% highlight c# tabtitle="C#" %}
@@ -358,7 +362,7 @@ public static class FileUtil
{% endhighlight %}
-**Step 12**: Build the project.
+Step 13: Build the project.
Run the following command in terminal to build the project.
@@ -366,7 +370,7 @@ Run the following command in terminal to build the project.
dotnet build
```
-**Step 13**: Run the project.
+Step 14: Run the project.
Run the following command in terminal to build the project.
@@ -382,7 +386,7 @@ dotnet run
* JetBrains Rider.
* Install .NET 8 SDK or later.
-**Step 1**. Open JetBrains Rider and create a new Blazor server-side app project.
+Step 1. Open JetBrains Rider and create a new Blazor server-side app project.
* Launch JetBrains Rider.
* Click new solution on the welcome screen.
@@ -396,7 +400,7 @@ dotnet run

-**Step 2**: Install the NuGet package from [NuGet.org](https://www.nuget.org/).
+Step 2: Install the NuGet package from [NuGet.org](https://www.nuget.org/).
* Click the NuGet icon in the Rider toolbar and type [Syncfusion.HtmlToPdfConverter.Net.Windows](https://www.nuget.org/packages/Syncfusion.HtmlToPdfConverter.Net.Windows/) in the search bar.
* Ensure that "nuget.org" is selected as the package source.
* Select the latest Syncfusion.HtmlToPdfConverter.Net.Windows NuGet package from the list.
@@ -410,7 +414,7 @@ dotnet run
N> Starting with v16.2.0.x, if you reference Syncfusion® assemblies from trial setup or from the NuGet feed, you also have to add "Syncfusion.Licensing" assembly reference and include a license key in your projects. Please refer to this [link](https://help.syncfusion.com/common/essential-studio/licensing/overview) to know about registering Syncfusion® license key in your application to use our components.
-**Step 3**: Create a new class file named `ExportService.cs` under Data folder and include the following namespaces in the file.
+Step 3: Create a new class file named ExportService under Data folder and include the following namespaces in the file.
{% highlight c# tabtitle="C#" %}
@@ -420,7 +424,7 @@ using System.IO;
{% endhighlight %}
-**Step 4**: Add the following code to convert HTML to PDF document in ExportService class using [Convert](https://help.syncfusion.com/cr/document-processing/Syncfusion.HtmlConverter.HtmlToPdfConverter.html#Syncfusion_HtmlConverter_HtmlToPdfConverter_Convert_System_String_) method in [HtmlToPdfConverter](https://help.syncfusion.com/cr/document-processing/Syncfusion.HtmlConverter.HtmlToPdfConverter.html) class.
+Step 4: Add the following code to convert HTML to PDF document in ExportService class using [Convert](https://help.syncfusion.com/cr/document-processing/Syncfusion.HtmlConverter.HtmlToPdfConverter.html#Syncfusion_HtmlConverter_HtmlToPdfConverter_Convert_System_String_) method in [HtmlToPdfConverter](https://help.syncfusion.com/cr/document-processing/Syncfusion.HtmlConverter.HtmlToPdfConverter.html) class.
{% highlight c# tabtitle="C#" %}
@@ -434,14 +438,12 @@ public MemoryStream CreatePdf(string url)
MemoryStream stream = new MemoryStream();
//Save the document to memory stream.
document.Save(stream);
- //Close the document
- document.Close(true);
return stream;
}
{% endhighlight %}
-**Step 5**: Register your service in the ConfigureServices method available in the Startup.cs class as follows.
+Step 5: Register your service in the ConfigureServices method available in the Startup.cs class as follows.
{% highlight c# tabtitle="C#" %}
@@ -458,7 +460,7 @@ public void ConfigureServices(IServiceCollection services)
{% endhighlight %}
-**Step 6**: Inject ExportService into FetchData.razor using the following code.
+Step 6: Inject ExportService into FetchData.razor using the following code.
{% highlight c# tabtitle="C#" %}
@@ -469,7 +471,7 @@ public void ConfigureServices(IServiceCollection services)
{% endhighlight %}
-**Step 7**: Create a button in the FetchData.razor using the following code.
+Step 7: Create a button in the FetchData.razor using the following code.
{% highlight c# tabtitle="C#" %}
@@ -477,7 +479,7 @@ public void ConfigureServices(IServiceCollection services)
{% endhighlight %}
-**Step 8**: Add the ExportToPdf method in FetchData.razor page to call the export service.
+Step 8: Add the ExportToPdf method in FetchData.razor page to call the export service.
{% highlight c# tabtitle="C#" %}
@@ -509,7 +511,7 @@ public void ConfigureServices(IServiceCollection services)
{% endhighlight %}
-**Step 9**: Create a class file with FileUtil name and add the following code to invoke the JavaScript action to download the file in the browser.
+Step 9: Create a class file with FileUtil name and add the following code to invoke the JavaScript action to download the file in the browser.
{% highlight c# tabtitle="C#" %}
@@ -524,7 +526,7 @@ public static class FileUtil
{% endhighlight %}
-**Step 10**: Add the following JavaScript function in the _Host.cshtml available under the Pages folder.
+Step 10: Add the following JavaScript function in the _Host.cshtml available under the Pages folder.
{% highlight c# tabtitle="C#" %}
@@ -557,11 +559,11 @@ public static class FileUtil
{% endhighlight %}
-**Step 11**: Build the project.
+Step 11: Build the project.
Click the **Build** button in the toolbar or press Ctrl+Shift+B to build the project.
-**Step 12**: Run the project.
+Step 12: Run the project.
Click the **Run** button (green arrow) in the toolbar or press F5 to run the app.
@@ -569,14 +571,14 @@ Click the **Run** button (green arrow) in the toolbar or press F5 to
{% endtabcontents %}
-Executing the program displays the following output in the browser.
+By executing the program, you will get the following output in the browser.

-Click the **Export to PDF button** will generate a PDF document with the following output.
+Click the Export to PDF button, and you will get the PDF document with the following output.

A complete working sample for converting an HTML to PDF in the Blazor framework can be downloaded from [Github](https://github.com/SyncfusionExamples/html-to-pdf-csharp-examples/tree/master/Blazor).
-Click [here](https://www.syncfusion.com/document-processing/pdf-framework/blazor/html-to-pdf) to explore the rich set of features available in the Syncfusion HTML to PDF converter library.
+Click [here](https://www.syncfusion.com/document-processing/pdf-framework/blazor/html-to-pdf) to explore the rich set of Syncfusion® HTML to PDF converter library features.
An online sample link to [convert HTML to PDF document](https://ej2.syncfusion.com/aspnetcore/PDF/HtmltoPDF#/material3) in ASP.NET Core.
\ No newline at end of file
diff --git a/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/htmlconversion_images/Blazor-Server-App.png b/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/htmlconversion_images/Blazor-Server-App.png
deleted file mode 100644
index 6822f2eac..000000000
Binary files a/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/htmlconversion_images/Blazor-Server-App.png and /dev/null differ
diff --git a/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/htmlconversion_images/Blazor-web-app.png b/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/htmlconversion_images/Blazor-web-app.png
deleted file mode 100644
index 3adc8ee14..000000000
Binary files a/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/htmlconversion_images/Blazor-web-app.png and /dev/null differ
diff --git a/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/htmlconversion_images/blazor_step1.png b/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/htmlconversion_images/blazor_step1.png
new file mode 100644
index 000000000..845b4eba8
Binary files /dev/null and b/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/htmlconversion_images/blazor_step1.png differ
diff --git a/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/htmlconversion_images/blazor_step2.png b/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/htmlconversion_images/blazor_step2.png
new file mode 100644
index 000000000..af61d692d
Binary files /dev/null and b/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/htmlconversion_images/blazor_step2.png differ
diff --git a/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/htmlconversion_images/blazor_step3.png b/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/htmlconversion_images/blazor_step3.png
new file mode 100644
index 000000000..98d48a1cb
Binary files /dev/null and b/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/htmlconversion_images/blazor_step3.png differ
diff --git a/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/linux.md b/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/linux.md
index 96002356d..48fe7b996 100644
--- a/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/linux.md
+++ b/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/linux.md
@@ -63,12 +63,14 @@ Step 4: Add code samples in Program.cs file to convert HTML to PDF document usi
//Initialize HTML to PDF converter.
HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter();
-
+BlinkConverterSettings settings = new BlinkConverterSettings();
+//Assign Blink settings to the HTML converter.
+htmlConverter.ConverterSettings = settings;
//Convert URL to PDF document.
PdfDocument document = htmlConverter.Convert("https://www.syncfusion.com");
-
+FileStream fileStream = new FileStream("HTML-to-PDF.pdf", FileMode.CreateNew, FileAccess.ReadWrite);
//Save and close a PDF document.
-document.Save("Output.pdf");
+document.Save(fileStream);
document.Close(true);
{% endhighlight %}
diff --git a/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/mac.md b/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/mac.md
index 7d311ea24..825611765 100644
--- a/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/mac.md
+++ b/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/mac.md
@@ -74,8 +74,6 @@ public IActionResult ExportToPDF()
PdfDocument document = htmlConverter.Convert("https://www.syncfusion.com");
MemoryStream stream = new MemoryStream();
document.Save(stream);
- //Close the document
- document.Close(true);
//Download the PDF document in the browser
return File(stream.ToArray(), System.Net.Mime.MediaTypeNames.Application.Pdf, "HTML-to-PDF.pdf");
}
@@ -85,6 +83,8 @@ public IActionResult ExportToPDF()
Step 8: Right click the project and select Build.

+N> Once the build succeeded, unzip the chromium.app file in bin folder (bin-> Debug-> net6.0-> runtimes-> osx-> native-> Chromium.app)`
+
Step 9: Run the application.

@@ -155,8 +155,6 @@ public IActionResult ExportToPDF()
PdfDocument document = htmlConverter.Convert("https://www.syncfusion.com");
MemoryStream stream = new MemoryStream();
document.Save(stream);
- //Close the document
- document.Close(true);
//Download the PDF document in the browser
return File(stream.ToArray(), System.Net.Mime.MediaTypeNames.Application.Pdf, "HTML-to-PDF.pdf");
}
diff --git a/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/net-core.md b/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/net-core.md
index 653bfe36f..110cfa656 100644
--- a/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/net-core.md
+++ b/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/net-core.md
@@ -79,7 +79,7 @@ PdfDocument document = htmlConverter.Convert("https://www.syncfusion.com");
MemoryStream stream = new MemoryStream();
//Save and close the document.
document.Save(stream);
-document.Close(true);
+document.Close();
return File(stream.ToArray(), System.Net.Mime.MediaTypeNames.Application.Pdf, "HTML-to-PDF.pdf");
{% endhighlight %}
@@ -163,7 +163,7 @@ PdfDocument document = htmlConverter.Convert("https://www.syncfusion.com");
MemoryStream stream = new MemoryStream();
//Save and close the document.
document.Save(stream);
-document.Close(true);
+document.Close();
return File(stream.ToArray(), System.Net.Mime.MediaTypeNames.Application.Pdf, "HTML-to-PDF.pdf");
{% endhighlight %}
@@ -261,7 +261,7 @@ PdfDocument document = htmlConverter.Convert("https://www.syncfusion.com");
MemoryStream stream = new MemoryStream();
//Save and close the document.
document.Save(stream);
-document.Close(true);
+document.Close();
return File(stream.ToArray(), System.Net.Mime.MediaTypeNames.Application.Pdf, "HTML-to-PDF.pdf");
{% endhighlight %}
diff --git a/Document-Processing/PDF/Conversions/HTML-To-PDF/overview.md b/Document-Processing/PDF/Conversions/HTML-To-PDF/overview.md
index be164c484..29a0ec508 100644
--- a/Document-Processing/PDF/Conversions/HTML-To-PDF/overview.md
+++ b/Document-Processing/PDF/Conversions/HTML-To-PDF/overview.md
@@ -16,15 +16,16 @@ Syncfusion® HTML-to-PDF converter will work seamlessly in various
* Converts any [webpage to PDF](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/features#url-to-pdf).
* Converts any raw [HTML string to PDF](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/features#html-string-to-pdf).
* Converts [HTML form to fillable PDF form](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/features#html-form-to-pdf-form).
-* Automatically creates [Table of Contents](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/features#table-of-contents-with-custom-style).
+* Automatically creates [Table of Contents](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/features#table-of-contents).
* Automatically creates [bookmark hierarchy](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/features#bookmarks).
* Converts only a [part of the web page to PDF](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/features#partial-webpage-to-pdf).
-* Supports PDF [header and PDF footer](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/features#header-and-footer).
+* Supports PDF header and PDF footer.
* Repeats HTML table header and footer in PDF.
* Supports HTML5, CSS3, SVG, and Web fonts.
* Converts any [HTML to an image](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/features#url-to-image).
-* Converts any [SVG to image](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/features#svg-file-to-image).
-* Supports accessing HTML pages using both [HTTP POST and GET](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/features#http-get-and-post).
+* Converts any [SVG to image](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/features#url-to-image).
+* Supports accessing HTML pages using both [HTTP POST and GET](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/features#http-get-and-post) methods.
+* Supports [HTTP cookies](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/features#form-authentication).
* Supports [cookies-based form authentication](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/features#form-authentication).
* Thread safe.
* Supports internal and external [hyperlinks](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/features#hyperlinks).
@@ -213,9 +214,10 @@ blinkConverterSettings.ViewPortSize = new Syncfusion.Drawing.Size(1280, 0);
htmlConverter.ConverterSettings = blinkConverterSettings;
//Convert URL to PDF document.
PdfDocument document = htmlConverter.Convert("https://www.syncfusion.com");
-
+//Create a filestream.
+FileStream fileStream = new FileStream("HTML-to-PDF.pdf", FileMode.CreateNew, FileAccess.ReadWrite);
//Save and close the PDF document.
-document.Save("Output.pdf");
+document.Save(fileStream);
document.Close(true);
{% endhighlight %}
diff --git a/Document-Processing/PDF/PDF-Library/NET/Converting-HTML-to-PDF-in-ASP-NET-Core.md b/Document-Processing/PDF/PDF-Library/NET/Converting-HTML-to-PDF-in-ASP-NET-Core.md
new file mode 100644
index 000000000..3bbe65b4b
--- /dev/null
+++ b/Document-Processing/PDF/PDF-Library/NET/Converting-HTML-to-PDF-in-ASP-NET-Core.md
@@ -0,0 +1,78 @@
+---
+title: Convert a HTML to PDF file in ASP.NET Core | Syncfusion
+description: Learn how to convert a HTML to PDF file in ASP.NET Core with easy steps using Syncfusion .NET Core HTML Converter library.
+platform: document-processing
+control: PDF
+documentation: UG
+keywords: Assemblies
+---
+
+# Convert HTML to PDF file in ASP.NET Core
+
+The Syncfusion® HTML to PDF converter is a .NET Core library used to convert HTML or web pages to PDF document. Using this library you can convert HTML to PDF in ASP.NET Core application.
+
+To include the HTML Converter library into your ASP.NET Core application, please refer to the [NuGet Packages Required](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/overview#nuget-packages-required-recommended) or [Assemblies Required](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/overview#assemblies-required) documentation.
+
+## Steps to convert HTML to PDF document using Blink in ASP.NET Core
+
+Create a new C# ASP.NET Core Web Application project.
+
+
+Set the project name, location and .NET version for your ASP.NET Core application.
+
+
+
+
+Install the [Syncfusion.HtmlToPdfConverter.Net.Windows](https://www.nuget.org/packages/Syncfusion.HtmlToPdfConverter.Net.Windows) as a reference to your .NET Standard applications from [NuGet.org](https://www.nuget.org/).
+
+
+A default controller with name HomeController.cs gets added on creation of ASP.NET Core project. Include the following namespaces in that HomeController.cs file.
+
+{% highlight c# tabtitle="C#" %}
+
+using Syncfusion.HtmlConverter;
+using Syncfusion.Pdf;
+
+{% endhighlight %}
+
+A default action method named Index will be present in HomeController.cs. Right click on Index method and select Go To View where you will be directed to its associated view page Index.cshtml.
+
+Add a new button in the Index.cshtml as shown below.
+
+{% highlight c# tabtitle="C#" %}
+
+@{Html.BeginForm("ExportToPDF", "Home", FormMethod.Post);
+{
+
+
+
+}
+Html.EndForm();
+}
+{% endhighlight %}
+
+Add a new action method ExportToPDF in HomeController.cs and include the below code snippet to convert HTML to PDF file and download it.
+
+{% highlight c# tabtitle="C#" %}
+
+//Initialize HTML to PDF converter
+HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter();
+
+//Convert URL to PDF document
+PdfDocument document = htmlConverter.Convert("https://www.syncfusion.com");
+
+//Create memory stream
+MemoryStream stream = new MemoryStream();
+
+//Save the document
+document.Save(stream);
+
+return File(stream.ToArray(), System.Net.Mime.MediaTypeNames.Application.Pdf, "HTML-to-PDF.pdf");
+
+{% endhighlight %}
+
+A complete working sample can be downloaded from [HtmlToPDFSample.zip](https://www.syncfusion.com/downloads/support/directtrac/general/ze/HTML-To-PDF-sample840126948).
+
+By executing the program, you will get the PDF document as follows.
+
+
diff --git a/Document-Processing/PDF/PDF-Library/NET/Converting-HTML-to-PDF-in-Windows-Forms.md b/Document-Processing/PDF/PDF-Library/NET/Converting-HTML-to-PDF-in-Windows-Forms.md
new file mode 100644
index 000000000..e4c6fa146
--- /dev/null
+++ b/Document-Processing/PDF/PDF-Library/NET/Converting-HTML-to-PDF-in-Windows-Forms.md
@@ -0,0 +1,105 @@
+---
+title: Convert a HTML to PDF file in Windows-Forms | Syncfusion
+description: Learn how to convert a HTML to PDF file in Windows-Forms with easy steps using Syncfusion .NET HTML converter library.
+platform: document-processing
+control: PDF
+documentation: UG
+keywords: Assemblies
+---
+
+# Convert HTML to PDF file in Windows Forms
+
+The [Syncfusion® HTML to PDF converter](https://www.syncfusion.com/document-processing/pdf-framework/net/html-to-pdf) is a .NET library used to convert HTML or web pages to PDF document in Windows Forms application.
+
+To include the .NET HTML to PDF converter library into your Windows Forms application, please refer to the [NuGet Package Required](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/overview#nuget-packages-required-recommended) or [Assemblies Required](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/overview#assemblies-required) documentation.
+
+## Steps to convert Html to PDF document in Windows Forms
+
+Step 1: Create a new Windows Forms application project.
+
+In project configuration window, name your project and select Create.
+
+
+Step 2: Install the [Syncfusion.HtmlToPdfConverter.WinForms](https://www.nuget.org/packages/Syncfusion.HtmlToPdfConverter.WinForms) NuGet package as a reference to your WinForms application [NuGet.org](https://www.nuget.org/).
+
+
+Step 3: Add the following namespaces into **Form1.Designer.cs** file.
+
+{% highlight c# tabtitle="C#" %}
+
+using System;
+using System.Windows.Forms;
+
+{% endhighlight %}
+
+Step 4: Add a new button in **Form1.Designer.cs** to convert HTML to PDF document as follows.
+
+{% highlight c# tabtitle="C#" %}
+
+private Button btnCreate;
+private Label label;
+private void InitializeComponent()
+{
+ btnCreate = new Button();
+ label = new Label();
+
+ //Label
+ label.Location = new System.Drawing.Point(0, 40);
+ label.Size = new System.Drawing.Size(426, 35);
+ label.Text = "Click the button to convert Html to PDF file";
+ label.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+
+ //Button
+ btnCreate.Location = new System.Drawing.Point(180, 110);
+ btnCreate.Size = new System.Drawing.Size(85, 26);
+ btnCreate.Text = "Convert Html to PDF";
+ btnCreate.Click += new EventHandler(btnCreate_Click);
+
+ //Create PDF
+ ClientSize = new System.Drawing.Size(450, 150);
+ Controls.Add(label);
+ Controls.Add(btnCreate);
+ Text = "Convert Html to PDF";
+}
+
+{% endhighlight %}
+
+Step 5: Include the following namespaces in the **Form1.cs** file.
+
+{% highlight c# tabtitle="C#" %}
+
+using Syncfusion.HtmlConverter;
+using Syncfusion.Pdf;
+using System;
+
+{% endhighlight %}
+
+Step 6: Create the btnCreate_Click event and add the following code in btnCreate_Click to convert HTML to PDF document using [Convert](https://help.syncfusion.com/cr/document-processing/Syncfusion.HtmlConverter.HtmlToPdfConverter.html#Syncfusion_HtmlConverter_HtmlToPdfConverter_Convert_System_String_) method in [HtmlToPdfConverter](https://help.syncfusion.com/cr/document-processing/Syncfusion.HtmlConverter.HtmlToPdfConverter.html) class. The HTML content will be scaled based on the given [ViewPortSize](https://help.syncfusion.com/cr/document-processing/Syncfusion.HtmlConverter.BlinkConverterSettings.html#Syncfusion_HtmlConverter_BlinkConverterSettings_ViewPortSize) property of [BlinkConverterSettings](https://help.syncfusion.com/cr/document-processing/Syncfusion.HtmlConverter.BlinkConverterSettings.html) class.
+
+{% highlight c# tabtitle="C#" %}
+
+//Initialize HTML to PDF converter.
+HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter();
+BlinkConverterSettings blinkConverterSettings = new BlinkConverterSettings();
+//Set Blink viewport size.
+blinkConverterSettings.ViewPortSize = new System.Drawing.Size(1280, 0);
+//Assign Blink converter settings to HTML converter.
+htmlConverter.ConverterSettings = blinkConverterSettings;
+//Convert URL to PDF document.
+PdfDocument document = htmlConverter.Convert("https://www.syncfusion.com");
+//Create file stream.
+FileStream stream = new FileStream("HTML-to-PDF.pdf", FileMode.CreateNew);
+//Save the document into stream.
+document.Save(stream);
+//If the position is not set to '0' then the PDF will be empty.
+stream.Position = 0;
+//Close the document.
+document.Close();
+stream.Dispose();
+
+{% endhighlight %}
+
+By executing the program, you will get the PDF document as follows.
+
+
+A complete working sample can be downloaded from [Github](https://github.com/SyncfusionExamples/html-to-pdf-csharp-examples/tree/master/Windows%20Forms).
diff --git a/Document-Processing/PDF/PDF-Library/NET/Converting-HTML-to-PDF.md b/Document-Processing/PDF/PDF-Library/NET/Converting-HTML-to-PDF.md
new file mode 100644
index 000000000..c565fc483
--- /dev/null
+++ b/Document-Processing/PDF/PDF-Library/NET/Converting-HTML-to-PDF.md
@@ -0,0 +1,320 @@
+---
+title: Converting HTML to PDF | Syncfusion
+description: Learn how to convert HTML to PDF using 2 different rendering engines (Blink and IE) with various features like TOC, partial web page to PDF etc.
+platform: document-processing
+control: PDF
+documentation: UG
+---
+# Converting HTML to PDF
+
+The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.
+
+Syncfusion® HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.
+
+## Key features for HTML Converter
+
+* Converts any [webpage to PDF](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/features#url-to-pdf).
+* Converts any raw [HTML string to PDF](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/features#html-string-to-pdf).
+* Converts [HTML form to fillable PDF form](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/features#html-form-to-pdf-form).
+* Automatically creates [Table of Contents](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/features#table-of-contents).
+* Automatically creates [bookmark hierarchy](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/features#bookmarks).
+* Converts only a [part of the web page to PDF](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/features#partial-webpage-to-pdf).
+* Supports PDF header and PDF footer.
+* Repeats HTML table header and footer in PDF.
+* Supports HTML5, CSS3, SVG, and Web fonts.
+* Converts any [HTML to an image](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/features#url-to-image).
+* Converts any [SVG to image](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/features#url-to-image).
+* Supports accessing HTML pages using both [HTTP POST and GET](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/features#http-get-and-post) methods.
+* Supports [HTTP cookies](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/features#form-authentication).
+* Supports [cookies-based form authentication](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/features#form-authentication).
+* Thread safe.
+* Supports internal and external [hyperlinks](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/features#hyperlinks).
+* Sets document properties, page settings, security, viewer preferences, and more.
+* Protects PDF document with password and permission.
+* Compatible with .NET Framework 4.5 and above.
+* Compatible with .NET Core 2.0 and above.
+
+## Install HTML to PDF .NET library to your project
+
+Include the HTML to PDF converter in your project using two approaches.
+* NuGet packages (Recommended)
+* Assemblies.
+
+### NuGet Packages Required (Recommended)
+
+Directly install the NuGet packages to your .NET application from [nuget.org](https://www.nuget.org/).
+
+N> The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.
+
+
+
+Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion® libraries or components, use the HTML to PDF converter library with the same platform packages.
+
+
+
+### Assemblies Required
+
+Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for [Windows](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/advanced-installation#windows), [Linux](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/advanced-installation#linux), and [Mac](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/advanced-installation#mac), respectively. Please refer to the [advanced installation](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/advanced-installation) steps for more details.
+
+
+
+
+
+Platforms
+
+Assemblies
+
+
+
+
+
+WinForms
+WPF
+ASP.NET
+ASP.NET MVC
+
+
+
+
Syncfusion.Compression.Base.dll
+
Syncfusion.Pdf.Base.dll
+
Syncfusion.HtmlConverter.Base.dll
+
Newtonsoft.Json package (v13.0.1 or above)
+
+
+
+
+.NET/.NET Core
+Blazor
+
+
+
+
Syncfusion.Compression.Portable.dll
+
Syncfusion.Pdf.Portable.dll
+
Syncfusion.HtmlConverter.Portable.dll
+
Newtonsoft.Json package (v13.0.1 or above)
+
+
+
+
+## Get Started with HTML to PDF conversion
+
+### Convert HTML to PDF in C#
+
+Integrating HTML to PDF converter library in any .NET application is simple. Please refer to the following steps to include HTML to PDF conversion in your application.
+
+Steps to convert HTML to PDF in .NET application
+
+Step 1: Create a new .NET console application.
+
+
+
+
+Step 2: Install [Syncfusion.HtmlToPdfConverter.Net.Windows](https://www.nuget.org/packages/Syncfusion.HtmlToPdfConverter.Net.Windows) NuGet package as a reference to your .NET application from [NuGet.org](https://www.nuget.org/).
+
+
+Step 3: Include the following namespace in your class file.
+
+{% highlight c# tabtitle="C#" %}
+
+using Syncfusion.Pdf;
+using Syncfusion.HtmlConverter;
+
+{% endhighlight %}
+
+Step 4: Use the following code sample to convert the URL to PDF in the program.cs.
+
+{% tabs %}
+
+{% highlight c# tabtitle="C#" %}
+
+//Initialize HTML to PDF converter.
+HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter();
+BlinkConverterSettings blinkConverterSettings = new BlinkConverterSettings();
+//Set Blink viewport size.
+blinkConverterSettings.ViewPortSize = new Syncfusion.Drawing.Size(1280, 0);
+//Assign Blink converter settings to HTML converter.
+htmlConverter.ConverterSettings = blinkConverterSettings;
+//Convert URL to PDF document.
+PdfDocument document = htmlConverter.Convert("https://www.syncfusion.com");
+//Create a filestream.
+FileStream fileStream = new FileStream("HTML-to-PDF.pdf", FileMode.CreateNew, FileAccess.ReadWrite);
+//Save and close the PDF document.
+document.Save(fileStream);
+document.Close(true);
+
+{% endhighlight %}
+
+{% endtabs %}
+
+By executing the program, you will get the PDF document as follows.
+
+
+A complete working sample can be downloaded from [Github](https://github.com/SyncfusionExamples/html-to-pdf-csharp-examples/tree/master/.NET).
+
+### Convert HTML to PDF in Linux
+
+HTML to PDF converter .NET library supports conversion in Linux. Refer to [this](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/linux) section for more information about HTML to PDF conversion in Linux.
+
+### Convert HTML to PDF in Docker
+
+HTML to PDF converter .NET library supports conversion in Docker. Refer to [this](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/docker) section for more information about HTML to PDF conversion in Docker.
+
+### Convert HTML to PDF in Mac
+
+HTML to PDF converter .NET library supports conversion in Mac. Refer to [this](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/mac) section for more information about HTML to PDF conversion in Mac.
+
+### Convert HTML to PDF in ASP.NET Core
+
+HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to [this](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/net-core) section for more information about HTML to PDF conversion in ASP.NET Core.
+
+### Convert HTML to PDF in ASP.NET MVC
+HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to [this](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/aspnet-mvc) section for more information about HTML to PDF conversion in ASP.NET MVC.
+
+### Convert HTML to PDF in Blazor
+HTML to PDF converter .NET library supports conversion in Blazor. Refer to [this](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/blazor) section for more information about HTML to PDF conversion in Blazor.
+
+### Convert HTML to PDF in Azure
+HTML to PDF converter .NET library supports conversion in Azure. Refer to [this](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/azure) section for more information about HTML to PDF conversion in Azure.
+
+### Convert HTML to PDF in AWS
+HTML to PDF converter .NET library supports conversion in AWS. Refer to [this](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/aws) section for more information about HTML to PDF conversion in AWS.
+
+## Features
+
+Refer to [this](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/features) section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.
+
+## Troubleshooting and FAQ
+
+<<<<<<< HEAD
+Refer to [this](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/troubleshooting) section for troubleshooting HTML to PDF conversion failures and frequently asked questions.
+=======
+
+## Steps to disable IE warning while performing HTML To PDF using the IE rendering engine
+
+By default, the PDF document generated with the IE rendering engine comes with the following warning message.
+
+
+Please refer to the below code snippet to use the DisableIEWarning API to remove the default IE warning from the PDF document.
+
+{% tabs %}
+
+{% highlight c# tabtitle="C#" %}
+
+//Initialize the HTML to PDF converter
+ HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(HtmlRenderingEngine.IE);
+IEConverterSettings settings = new IEConverterSettings();
+//Disable Default IE warning message.
+settings.DisableIEWarning = true;
+//Assign IE settings to HTML converter
+htmlConverter.ConverterSettings = settings;
+//Convert URL to PDF
+PdfDocument document = htmlConverter.Convert("https://www.google.com");
+
+//Save and close the PDF document
+document.Save("Output.pdf");
+document.Close(true);
+
+{% endhighlight %}
+
+{% highlight vb.net tabtitle="VB.NET" %}
+'Initialize the HTML to PDF converter
+Dim htmlConverter As New HtmlToPdfConverter(HtmlRenderingEngine.IE)
+Dim settings As New IEConverterSettings()
+'Disable Default IE Warning Message
+settings.DisableIEWarning = true
+'Assign IE settings to HTML converter
+htmlConverter.ConverterSettings = settings
+'Convert URL to PDF
+Dim document As PdfDocument = htmlConverter.Convert("https://www.google.com")
+
+'Save and close the PDF document
+document.Save("Output.pdf")
+document.Close(True)
+
+{% endhighlight %}
+
+{% highlight c# tabtitle="ASP.NET Core" %}
+//Currently, IE rendering engine does not support conversion in .NET Core platform
+{% endhighlight %}
+
+{% endtabs %}
+
+N>Please try our [Blink](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/net-core) engine to improve the quality and accuracy of the HTML to PDF conversion.
diff --git a/Document-Processing/PDF/PDF-Library/NET/Create-PDF-document-in-AKS-Environment.md b/Document-Processing/PDF/PDF-Library/NET/Create-PDF-document-in-AKS-Environment.md
index 3e3f3047e..441d88179 100644
--- a/Document-Processing/PDF/PDF-Library/NET/Create-PDF-document-in-AKS-Environment.md
+++ b/Document-Processing/PDF/PDF-Library/NET/Create-PDF-document-in-AKS-Environment.md
@@ -23,21 +23,22 @@ Step 3: Click **Create** button.
Step 4: Install the [Syncfusion.Pdf.Net.Core](https://www.nuget.org/packages/Syncfusion.Pdf.Net.Core/) NuGet package as a reference to your project from [NuGet.org](https://www.nuget.org/).

+
Step 5: A default action method named Index will be present in *HomeController.cs*. Right click on Index method and select Go To View where you will be directed to its associated view page *Index.cshtml*. Add a new button in the *Index.cshtml* as shown below.
{% tabs %}
{% highlight c# tabtitle="C#" %}
-@{
- Html.BeginForm("CreatePDFDocument", "Home", FormMethod.Get);
- {
-
+ }
+ Html.EndForm();
}
- Html.EndForm();
-}
{% endhighlight %}
@@ -49,10 +50,10 @@ Step 6: Include the following namespaces in *HomeController.cs*.
{% highlight c# tabtitle="C#" %}
-using Syncfusion.Pdf.Graphics;
-using Syncfusion.Pdf;
-using System.Diagnostics;
-using Syncfusion.Drawing;
+ using Syncfusion.Pdf.Graphics;
+ using Syncfusion.Pdf;
+ using System.Diagnostics;
+ using Syncfusion.Drawing;
{% endhighlight %}
@@ -64,7 +65,7 @@ Step 7: Add a new action method named CreatePDFDocument in HomeController.cs fil
{% highlight c# tabtitle="C#" %}
-public IActionResult CreatePDFDocument()
+ public IActionResult CreatePDFDocument()
{
//Create a new PDF document.
PdfDocument document = new PdfDocument();
@@ -164,7 +165,7 @@ Step 2: You need to gather the credentials in order to interact with the cluster
{% highlight c# tabtitle="C#" %}
-az aks get-credentials --resource-group CreatePdfDocument --name aks-uk-demo-msdn
+ az aks get-credentials --resource-group CreatePdfDocument --name aks-uk-demo-msdn
{% endhighlight %}
@@ -174,7 +175,7 @@ Step 3: You can review the credentials with the following command:
{% tabs %}
{% highlight c# tabtitle="C#" %}
-cat .kube/config
+ cat .kube/config
{% endhighlight %}
@@ -186,7 +187,7 @@ Step 4: Now in the Cloud Shell, create a new file called deploy.yaml as follows:
{% tabs %}
{% highlight c# tabtitle="C#" %}
-code deploy.yaml
+ code deploy.yaml
{% endhighlight %}
@@ -235,7 +236,7 @@ Step 6: Once you save and close the code editor, it’s finally time to apply th
{% tabs %}
{% highlight c# tabtitle="C#" %}
-kubectl apply -f deploy.yaml
+ kubectl apply -f deploy.yaml
{% endhighlight %}
@@ -249,10 +250,10 @@ Step 8: You can run the following commands:
{% tabs %}
{% highlight c# tabtitle="C#" %}
-kubectl get pods
-kubectl get nodes
-kubectl get service
-kubectl describe deployment
+ kubectl get pods
+ kubectl get nodes
+ kubectl get service
+ kubectl describe deployment
{% endhighlight %}
{% endtabs %}
@@ -261,7 +262,7 @@ or
{% tabs %}
{% highlight c# tabtitle="C#" %}
-kubectl get all
+ kubectl get all
{% endhighlight %}
{% endtabs %}
@@ -285,8 +286,8 @@ If you want to clean up the cluster, you can run the following commands:
{% tabs %}
{% highlight c# tabtitle="C#" %}
-kubectl delete -f deploy.yaml
-kubectl delete svc asp-docker-app --namespace=default
+ kubectl delete -f deploy.yaml
+ kubectl delete svc asp-docker-app --namespace=default
{% endhighlight %}
{% endtabs %}
diff --git a/Document-Processing/PDF/PDF-Library/NET/Create-PDF-document-in-Blazor.md b/Document-Processing/PDF/PDF-Library/NET/Create-PDF-document-in-Blazor.md
index 1298ee5e4..62fc9e6c1 100644
--- a/Document-Processing/PDF/PDF-Library/NET/Create-PDF-document-in-Blazor.md
+++ b/Document-Processing/PDF/PDF-Library/NET/Create-PDF-document-in-Blazor.md
@@ -4,14 +4,13 @@ description: Learn how to create or generate a PDF file in Blazor applications w
platform: document-processing
control: PDF
documentation: UG
-keywords: blazor pdf, pdf generation, document creation, blazor server, blazor wasm, pdf library
---
# Create or Generate PDF file in Blazor
-The Syncfusion® [Blazor PDF library](https://www.syncfusion.com/document-processing/pdf-framework/blazor/pdf-library) creates, reads, and edits PDF documents. This library also offers functionality to merge, split, stamp, forms, and secure PDF files.
+The Syncfusion® [Blazor PDF library](https://www.syncfusion.com/document-processing/pdf-framework/blazor/pdf-library) is used to create, read, and edit PDF documents. This library also offers functionality to merge, split, stamp, forms, and secure PDF files.
-To include the Syncfusion® Blazor PDF library into Blazor applications, refer to the [NuGet Package Required](https://help.syncfusion.com/document-processing/pdf/pdf-library/net/nuget-packages-required) or [Assemblies Required](https://help.syncfusion.com/document-processing/pdf/pdf-library/net/assemblies-required) documentation.
+To include the Syncfusion® Blazor PDF library into your Blazor application, please refer to the [NuGet Package Required](https://help.syncfusion.com/document-processing/pdf/pdf-library/net/nuget-packages-required) or [Assemblies Required](https://help.syncfusion.com/document-processing/pdf/pdf-library/net/assemblies-required) documentation.
To quickly get started with creating a PDF document in Blazor, check this video:
{% youtube "https://www.youtube.com/watch?v=B5BOBwus0Jc&t=2s" %}
@@ -32,18 +31,20 @@ To quickly get started with creating a PDF document in Blazor, check this video:
{% endtabcontent %}
{% endtabcontents %}
-A complete working sample is available from [GitHub](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/Getting%20Started/Blazor/ServerSideApplication).
+You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/Getting%20Started/Blazor/ServerSideApplication).
-The following output appears in the browser after executing the program.
+By executing the program, you will get the following output in the browser.

-Click the Export to PDF button to obtain the PDF document with the following output.
+Click the Export to PDF button, and you will get the PDF document with the following output.

-N> Server-Side Blazor applications are recommended to reduce the payload, which is high in Blazor Client-Side applications.
+N> It is recommended to use Blazor Server-Side application to reduce the pay back load which is high in Blazor Client-Side.
Click [here](https://www.syncfusion.com/document-processing/pdf-framework/blazor) to explore the rich set of Syncfusion® PDF library features.
+An online sample link to [create PDF document](https://blazor.syncfusion.com/demos/pdf/hello-world?theme=fluent) in Blazor.
+
## Steps to create PDF document in Blazor WASM application
{% tabcontents %}
@@ -60,16 +61,18 @@ Click [here](https://www.syncfusion.com/document-processing/pdf-framework/blazor
{% endtabcontent %}
{% endtabcontents %}
-A complete working sample is available from [GitHub](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/Getting%20Started/Blazor/ClientSideApplication).
+You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/Getting%20Started/Blazor/ClientSideApplication).
-The following output appears in the browser after executing the program.
+By executing the program, you will get the following output in the browser.

-Click the Export to PDF button to obtain the PDF document with the following output.
+Click the Export to PDF button and you will get the PDF document with the following output.

Click [here](https://www.syncfusion.com/document-processing/pdf-framework/blazor) to explore the rich set of Syncfusion® PDF library features.
+An online sample link to [create PDF document](https://blazor.syncfusion.com/demos/pdf/hello-world?theme=fluent) in Blazor.
+
## Steps to create PDF documents in .NET MAUI Blazor application
{% tabcontents %}
@@ -86,13 +89,13 @@ Click [here](https://www.syncfusion.com/document-processing/pdf-framework/blazor
{% endtabcontent %}
{% endtabcontents %}
-A complete working sample is available from [GitHub](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/Getting%20Started/Blazor/BlazorMauiAppCreatePdfSample).
+You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/Getting%20Started/Blazor/BlazorMauiAppCreatePdfSample).
-The following output appears in the browser when clicking the "Weather" option in the left-side menu.
+By running the program, you will see the output in the browser when you click the "Whether" option in the left-side menu.

-Click the `Export to PDF` button to obtain the PDF document with the following output.
-
+Click the `Export to PDF` button to get the PDF document with the following output.
+
### Save the PDF document on different platforms
@@ -111,9 +114,9 @@ Create a folder named `Services`, then add a class called `SaveService.cs` withi
{% endtabs %}
-Platform-specific code implementation is required to save the PDF document across different platforms.
+Now, we need to implement platform-specific code to save the PDF document.
-#### Android
+#### Andriod
Create a new class file named `SaveAndroid.cs` within the Android folder and add the following code to enable file saving on the Android platform.
{% tabs %}
@@ -184,7 +187,7 @@ Create a new class file named `SaveAndroid.cs` within the Android folder and add
{% endtabs %}
-N> The Android SDK version 23 and above introduced a new runtime permission model. Include the following code for enabling the Android file provider to save and view the generated PDF document.
+N> Introduced a new runtime permission model for the Android SDK version 23 and above. So, include the following code for enabling the Android file provider to save and view the generated PDF document.
1. Create a new XML file with the name of `file_paths.xml` under the Android project Resources/xml folder and add the following code in it.
@@ -242,7 +245,7 @@ N> The Android SDK version 23 and above introduced a new runtime permission mode
{% endtabs %}
-#### iOS
+#### IOS
Create a new class file named `SaveIOS.cs` within the iOS folder and include the following code to enable file saving on the iOS platform.
{% tabs %}
@@ -283,8 +286,8 @@ Create a new class file named `SaveIOS.cs` within the iOS folder and include the
{% endtabs %}
-#### macOS
-Create a new class file named `SaveMac.cs` within the MacCatalyst folder and include the following code to enable file saving on the macOS platform.
+#### MacOS
+Create a new class file named `SaveMac.cs` within the MacCatalyst folder and include the following code to enable file saving on the MacOS platform.
{% tabs %}
@@ -449,6 +452,6 @@ Create a new class file named `SaveWindows.cs` within the Windows folder and inc
{% endtabs %}
-The helper files mentioned above are available on [this](https://help.syncfusion.com/document-processing/pdf/pdf-library/net/create-pdf-file-in-maui#helper-files-for-net-maui) page. Refer to [this](https://help.syncfusion.com/document-processing/pdf/pdf-library/net/create-pdf-file-in-maui#helper-files-for-net-maui) page for more details.
+The helper files mentioned above are available on [this](https://help.syncfusion.com/document-processing/pdf/pdf-library/net/create-pdf-file-in-maui#helper-files-for-net-maui) page. You can refer to [this](https://help.syncfusion.com/document-processing/pdf/pdf-library/net/create-pdf-file-in-maui#helper-files-for-net-maui) page for more details.
Click [here](https://www.syncfusion.com/document-processing/pdf-framework/blazor) to explore the rich set of Syncfusion® PDF library features.
\ No newline at end of file
diff --git a/Document-Processing/PDF/PDF-Library/NET/Create-PDF-file-in-AWS-Elastic-Beanstalk.md b/Document-Processing/PDF/PDF-Library/NET/Create-PDF-file-in-AWS-Elastic-Beanstalk.md
index 91599fc0b..dfcdabdfb 100644
--- a/Document-Processing/PDF/PDF-Library/NET/Create-PDF-file-in-AWS-Elastic-Beanstalk.md
+++ b/Document-Processing/PDF/PDF-Library/NET/Create-PDF-file-in-AWS-Elastic-Beanstalk.md
@@ -29,11 +29,11 @@ Step 4: A default controller named HomeController.cs gets added to create the AS
{% tabs %}
{% highlight c# tabtitle="C#" %}
-using Syncfusion.Pdf;
-using Syncfusion.Pdf.Graphics;
-using Syncfusion.Pdf.Grid;
-using Syncfusion.Pdf.Parsing;
-using Syncfusion.Drawing;
+ using Syncfusion.Pdf;
+ using Syncfusion.Pdf.Graphics;
+ using Syncfusion.Pdf.Grid;
+ using Syncfusion.Pdf.Parsing;
+ using Syncfusion.Drawing;
{% endhighlight %}
{% endtabs %}
@@ -43,18 +43,18 @@ Step 5: Add a new button in index.cshtml as follows
{% tabs %}
{% highlight c# tabtitle="C#" %}
-@{
-Html.BeginForm("CreatePDF", "Home", FormMethod.Get);
-{
-
-}
-Html.EndForm();
+ }
+ Html.EndForm();
}
{% endhighlight %}
@@ -65,43 +65,43 @@ Step 6: Add a new action method named CreatePDF in HomeController.cs file and in
{% tabs %}
{% highlight c# tabtitle="C#" %}
-public IActionResult CreatePDF()
-{
- //Open an existing PDF document.
- FileStream fileStream = new FileStream("Data/Input.pdf", FileMode.Open, FileAccess.Read);
- PdfLoadedDocument document = new PdfLoadedDocument(fileStream);
-
- //Get the first page from a document.
- PdfLoadedPage page = document.Pages[0] as PdfLoadedPage;
-
- //Create PDF graphics for the page.
- PdfGraphics graphics = page.Graphics;
-
- //Create a PdfGrid.
- PdfGrid pdfGrid = new PdfGrid();
- //Add values to the list.
- List