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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -920,8 +920,7 @@ IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;

//A existing workbook is opened.
FileStream sampleFile = new FileStream("Sample.xlsx", FileMode.Open);
IWorkbook workbook = application.Workbooks.Open(sampleFile);
IWorkbook workbook = application.Workbooks.Open("Sample.xlsx");

//Access first worksheet from the workbook.
IWorksheet worksheet = workbook.Worksheets[0];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -730,8 +730,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
application.DefaultVersion = ExcelVersion.Xlsx;

//Load the existing Excel workbook into IWorkbook
FileStream inputStream = new FileStream("Sample.xlsx", FileMode.Open);
IWorkbook workbook = application.Workbooks.Open(inputStream);
IWorkbook workbook = application.Workbooks.Open("Sample.xlsx");

//Get the first worksheet in the workbook into IWorksheet
IWorksheet worksheet = workbook.Worksheets[0];
Expand Down Expand Up @@ -1420,7 +1419,7 @@ N> It is recommended to use Blazor Server application to reduce the pay back loa

Click [here](https://www.syncfusion.com/document-processing/excel-framework/blazor) to explore the rich set of Syncfusion<sup>&reg;</sup> Excel library (Excel) features.

An online sample link to [create an Excel document](https://blazor.syncfusion.com/demos/excel/create-excel?theme=fluent) in Blazor.
An online sample link to <a href="https://blazor.syncfusion.com/demos/excel/create-excel?theme=fluent">create an Excel document</a> in Blazor.

## Convert Excel to Image in Blazor WASM application

Expand Down Expand Up @@ -1692,7 +1691,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())

A complete working example of how to convert an Excel file to PDF in Blazor WASM application in C# is present on [this GitHub page](https://github.com/SyncfusionExamples/XlsIO-Examples/tree/master/Getting%20Started/Blazor/Client%20Side/ExcelToPDF).

N> Starting with v16.2.0.x, if you reference Syncfusion<sup>&reg;</sup> 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<sup>&reg;</sup> license key in your applications to use our components. You can also explore our [Blazor Excel library demo](https://blazor.syncfusion.com/demos/excel/create-excel?theme=bootstrap5) that shows how to create and modify Excel files from C# with just five lines of code.
N> Starting with v16.2.0.x, if you reference Syncfusion<sup>&reg;</sup> 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<sup>&reg;</sup> license key in your applications to use our components. You can also explore our <a href="https://blazor.syncfusion.com/demos/excel/create-excel?theme=bootstrap5">Blazor Excel library demo</a> that shows how to create and modify Excel files from C# with just five lines of code.

## Create a simple Excel report in Blazor Server Web application

Expand Down Expand Up @@ -2424,8 +2423,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
application.DefaultVersion = ExcelVersion.Xlsx;

//Load the existing Excel workbook into IWorkbook
FileStream inputStream = new FileStream("Sample.xlsx", FileMode.Open);
IWorkbook workbook = application.Workbooks.Open(inputStream);
IWorkbook workbook = application.Workbooks.Open("Sample.xlsx");

//Get the first worksheet in the workbook into IWorksheet
IWorksheet worksheet = workbook.Worksheets[0];
Expand All @@ -2448,4 +2446,4 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{% endhighlight %}
{% endtabs %}

A complete working example of how to read and edit an Excel file in Blazor Server web application in C# is present on [this GitHub page](https://github.com/SyncfusionExamples/XlsIO-Examples/tree/master/Getting%20Started/Blazor%20Web%20App/Server%20Side/Edit_Excel).
A complete working example of how to read and edit an Excel file in Blazor Server web application in C# is present on [this GitHub page](https://github.com/SyncfusionExamples/XlsIO-Examples/tree/master/Getting%20Started/Blazor%20Web%20App/Server%20Side/Edit_Excel).
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
//Adding text to a cell
worksheet.Range["A1"].Text = "Hello World";

//Saving the workbook as stream
FileStream stream = new FileStream("Sample.xlsx", FileMode.Create, FileAccess.ReadWrite);
workbook.SaveAs(stream);

//Dispose stream
stream.Dispose();
//Saving the workbook
workbook.SaveAs("Sample.xlsx");
}
{% endhighlight %}

Expand Down Expand Up @@ -188,7 +184,7 @@ Dim application As IApplication = excelEngine.Excel
{% endhighlight %}
{% endtabs %}

By default, the Excel version 97 to 2003 (*.xls) is associated with application object. XlsIO writes the excel files in the respective format depending on this excel version. You can modify the default Excel version to Xlsx as shown as follows.
By default, the Excel version 97 to 2003 (*.xls) is associated with application object. XlsIO writes the excel files in the respective format depending on this excel version. You can modify the default Excel version to XLSX as shown as follows.

{% tabs %}
{% highlight c# tabtitle="C# [Cross-platform]" %}
Expand Down Expand Up @@ -342,12 +338,8 @@ Finally, save the document in file system and close/dispose the instance of [IWo

{% tabs %}
{% highlight c# tabtitle="C# [Cross-platform]" %}
//Save the workbook as stream
FileStream stream = new FileStream("Sample.xlsx", FileMode.Create, FileAccess.ReadWrite);
workbook.SaveAs(stream);

//Disposing the stream
stream.Dispose();
//Save the workbook
workbook.SaveAs("Sample.xlsx");

//Closing the workbook
workbook.Close();
Expand Down Expand Up @@ -436,11 +428,7 @@ namespace ExcelCreation
worksheet.Pictures.AddPicture(10, 2, imageStream);

//Saving the workbook to disk in XLSX format
FileStream stream = new FileStream("Sample.xlsx", FileMode.Create, FileAccess.ReadWrite);
workbook.SaveAs(stream);

//Dispose stream
stream.Dispose();
workbook.SaveAs("Sample.xlsx");
}
}
}
Expand Down Expand Up @@ -595,10 +583,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
//Import data to worksheet
worksheet.ImportData(employees, 2, 1, false);

//Saving the workbook as stream
FileStream file = new FileStream("Sample.xlsx", FileMode.Create, FileAccess.ReadWrite);
workbook.SaveAs(file);
file.Dispose();
//Saving the workbook
workbook.SaveAs("Sample.xlsx");
}
{% endhighlight %}

Expand Down Expand Up @@ -831,17 +817,14 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
FileStream inputStream = new FileStream("WorkbookWithData.xlsx", FileMode.Open, FileAccess.Read);
IWorkbook workbook = application.Workbooks.Open(inputStream);
IWorkbook workbook = application.Workbooks.Open("WorkbookWithData.xlsx");
IWorksheet worksheet = workbook.Worksheets[0];

//Export data from worksheet used range to a DataTable
DataTable customersTable = worksheet.ExportDataTable(worksheet.UsedRange, ExcelExportDataTableOptions.ColumnNames | ExcelExportDataTableOptions.DetectColumnTypes);

//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 %}

Expand Down Expand Up @@ -1115,8 +1098,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
FileStream inputStream = new FileStream("TemplateMarker.xlsx", FileMode.Open, FileAccess.Read);
IWorkbook workbook = application.Workbooks.Open(inputStream);
IWorkbook workbook = application.Workbooks.Open("TemplateMarker.xlsx");

//Create template marker processor for the workbook
ITemplateMarkersProcessor marker = workbook.CreateTemplateMarkersProcessor();
Expand All @@ -1131,10 +1113,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
//Applying Markers
marker.ApplyMarkers();

//Saving the workbook as stream
FileStream file = new FileStream("TemplateMarkerResult.xlsx", FileMode.Create, FileAccess.ReadWrite);
workbook.SaveAs(file);
file.Dispose();
//Saving the workbook
workbook.SaveAs("TemplateMarkerResult.xlsx");
}
{% endhighlight %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
worksheet.Range["A9:A14"].RowHeight = 15;
worksheet.Range["A15:A23"].RowHeight = 18;

//Saving the Excel to the Stream
FileStream stream = new FileStream("CreateExcel.xlsx", FileMode.Create, FileAccess.Write);
workbook.SaveAs(stream);
//Saving the Excel
workbook.SaveAs("CreateExcel.xlsx");
}
{% endhighlight %}

Expand Down Expand Up @@ -633,9 +632,8 @@ using (ExcelEngine excelEngine = new ExcelEngine())
worksheet.Range["A9:A14"].RowHeight = 15;
worksheet.Range["A15:A23"].RowHeight = 18;

//Saving the Excel to the Stream
FileStream stream = new FileStream("CreateExcel.xlsx", FileMode.Create, FileAccess.Write);
workbook.SaveAs(stream);
//Saving the Excel
workbook.SaveAs("CreateExcel.xlsx");
}
{% endhighlight %}

Expand Down Expand Up @@ -1647,4 +1645,4 @@ By executing the program, you will get the Excel file as below.

Click [here](https://www.syncfusion.com/document-processing/excel-framework/net) to explore the rich set of Syncfusion<sup>&reg;</sup> Excel library (XlsIO) features.

An online sample link to [create an Excel document](https://ej2.syncfusion.com/aspnetcore/Excel/Create#/material3) in ASP.NET Core.
An online sample link to [create an Excel document](https://ej2.syncfusion.com/aspnetcore/Excel/Create#/material3) in ASP.NET Core.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Create, read, and edit Excel files in AWS Elastic Beanstalk | Syncfusion
description: Explains how to create, read, and edit Excel files in AWS Elastic Beanstalk.
title: Create, read, edit Excel files in AWS Elastic Beanstalk | Syncfusion
description: This page explains how to create, read, and edit Excel files in AWS Elastic Beanstalk using the Syncfusion .NET Excel library (XlsIO).
platform: document-processing
control: XlsIO
documentation: UG
Expand Down Expand Up @@ -291,8 +291,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
application.DefaultVersion = ExcelVersion.Xlsx;

//A existing workbook is opened.
FileStream sampleFile = new FileStream("Data/InputTemplate.xlsx", FileMode.Open);
IWorkbook workbook = application.Workbooks.Open(sampleFile);
IWorkbook workbook = application.Workbooks.Open("Data/InputTemplate.xlsx");

//Access first worksheet from the workbook.
IWorksheet worksheet = workbook.Worksheets[0];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Create, read, and edit Excel files in AWS Lambda | Syncfusion
description: Explains how to create, read, and edit Excel files in AWS Lambda.
description: This page explains how to create, read, and edit Excel files in AWS Lambda using the Syncfusion .NET Excel library (XlsIO).
platform: document-processing
control: XlsIO
documentation: UG
Expand Down Expand Up @@ -341,8 +341,7 @@ IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;

//A existing workbook is opened.
FileStream sampleFile = new FileStream("Sample.xlsx", FileMode.Open);
IWorkbook workbook = application.Workbooks.Open(sampleFile);
IWorkbook workbook = application.Workbooks.Open("Sample.xlsx");

//Access first worksheet from the workbook.
IWorksheet worksheet = workbook.Worksheets[0];
Expand All @@ -362,4 +361,4 @@ A complete working example of how to read and edit an Excel file in AWS Lambda i

Click [here](https://www.syncfusion.com/document-processing/excel-framework/net-core) to explore the rich set of Syncfusion<sup>&reg;</sup> Excel library (XlsIO) features.

An online sample link to [create an Excel document](https://ej2.syncfusion.com/aspnetcore/Excel/Create#/material3) in ASP.NET Core.
An online sample link to [create an Excel document](https://ej2.syncfusion.com/aspnetcore/Excel/Create#/material3) in ASP.NET Core.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Create, read, and edit Excel files in Azure App Service on Linux | Syncfusion
title: Create, read, edit Excel in Azure App Service on Linux | Syncfusion
description: Explains how to create, read, and edit Excel files in Azure App Service on Linux using Syncfusion XlsIO.
platform: document-processing
control: XlsIO
Expand Down Expand Up @@ -510,8 +510,7 @@ IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;

//A existing workbook is opened.
FileStream sampleFile = new FileStream("Sample.xlsx", FileMode.Open);
IWorkbook workbook = application.Workbooks.Open(sampleFile);
IWorkbook workbook = application.Workbooks.Open("Sample.xlsx");

//Access first worksheet from the workbook.
IWorksheet worksheet = workbook.Worksheets[0];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Create, read, and edit Excel files in Azure App Service on Windows | Syncfusion
title: Create, read, edit Excel in Azure App Service on Windows | Syncfusion
description: Explains how to create, read, and edit Excel files in Azure App Service on Windows using Syncfusion XlsIO.
platform: document-processing
control: XlsIO
Expand Down Expand Up @@ -510,8 +510,7 @@ IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;

//A existing workbook is opened.
FileStream sampleFile = new FileStream("Sample.xlsx", FileMode.Open);
IWorkbook workbook = application.Workbooks.Open(sampleFile);
IWorkbook workbook = application.Workbooks.Open("Sample.xlsx");

//Access first worksheet from the workbook.
IWorksheet worksheet = workbook.Worksheets[0];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Create, read, and edit Excel files in GCP | Syncfusion
description: Explains how to create, read, and edit Excel files in Google App Engine using Syncfusion XlsIO.
description: This page explains how to create, read, and edit Excel files in Google App Engine using the Syncfusion .NET Excel library (XlsIO).
platform: document-processing
control: XlsIO
documentation: UG
Expand Down Expand Up @@ -446,8 +446,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
application.DefaultVersion = ExcelVersion.Xlsx;

//A existing workbook is opened.
FileStream inputStream = new FileStream("InputTemplate.xlsx", FileMode.Open, FileAccess.Read);
IWorkbook workbook = application.Workbooks.Open(inputStream);
IWorkbook workbook = application.Workbooks.Open("InputTemplate.xlsx");

//Access first worksheet from the workbook.
IWorksheet worksheet = workbook.Worksheets[0];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
worksheet.Range["A9:A14"].RowHeight = 15;
worksheet.Range["A15:A23"].RowHeight = 18;

FileStream outputStream = new FileStream("Output.xlsx", FileMode.Create);
workbook.SaveAs(outputStream);
outputStream.Dispose();
workbook.SaveAs("Output.xlsx");
imageStream.Dispose();
}
{% endhighlight %}
Expand Down Expand Up @@ -254,8 +252,7 @@ IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;

//A existing workbook is opened.
FileStream inputStream = new FileStream("Sample.xlsx", FileMode.Open, FileAccess.Read);
IWorkbook workbook = application.Workbooks.Open(inputStream);
IWorkbook workbook = application.Workbooks.Open("Sample.xlsx");

//Access first worksheet from the workbook.
IWorksheet worksheet = workbook.Worksheets[0];
Expand All @@ -266,15 +263,8 @@ worksheet.Range["A3"].Text ="Hello World";
//Access a cell value from Excel
var value = worksheet.Range["A1"].Value;

//Initialize stream
FileStream outputStream = new FileStream("Output.xlsx", FileMode.Create);

//Save the workbook as stream
workbook.SaveAs(outputStream);

//Dispose the streams
outputStream.Dispose();
inputStream.Dispose();
//Save the workbook
workbook.SaveAs("Output.xlsx");

workbook.Close();
excelEngine.Dispose();
Expand All @@ -283,4 +273,4 @@ excelEngine.Dispose();

Click [here](https://www.syncfusion.com/document-processing/excel-framework/net-core) to explore the rich set of Syncfusion<sup>&reg;</sup> Excel library (XlsIO) features.

An online sample link to [create an Excel document](https://ej2.syncfusion.com/aspnetcore/Excel/Create#/material3) in ASP.NET Core.
An online sample link to [create an Excel document](https://ej2.syncfusion.com/aspnetcore/Excel/Create#/material3) in ASP.NET Core.
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
worksheet.Range["A9:A14"].RowHeight = 15;
worksheet.Range["A15:A23"].RowHeight = 18;

FileStream outputStream = new FileStream("Output.xlsx", FileMode.Create);
workbook.SaveAs(outputStream);
outputStream.Dispose();
workbook.SaveAs("Output.xlsx");
imageStream.Dispose();
}
{% endhighlight %}
Expand Down Expand Up @@ -439,9 +437,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
worksheet.Range["A9:A14"].RowHeight = 15;
worksheet.Range["A15:A23"].RowHeight = 18;

FileStream outputStream = new FileStream("Output.xlsx", FileMode.Create);
workbook.SaveAs(outputStream);
outputStream.Dispose();
workbook.SaveAs("Output.xlsx");
imageStream.Dispose();
}
{% endhighlight %}
Expand Down Expand Up @@ -485,14 +481,10 @@ worksheet.Range["A3"].Text ="Hello World";
//Access a cell value from Excel
var value = worksheet.Range["A1"].Value;

//Initialize stream
FileStream outputStream = new FileStream("Output.xlsx", FileMode.Create);

//Save the workbook as stream
workbook.SaveAs(outputStream);
//Save the workbook
workbook.SaveAs("Output.xlsx");

//Dispose the streams
outputStream.Dispose();
inputStream.Dispose();

workbook.Close();
Expand All @@ -502,4 +494,4 @@ excelEngine.Dispose();

Click [here](https://www.syncfusion.com/document-processing/excel-framework/net-core) to explore the rich set of Syncfusion<sup>&reg;</sup> Excel library (XlsIO) features.

An online sample link to [create an Excel document](https://ej2.syncfusion.com/aspnetcore/Excel/Create#/material3) in ASP.NET Core.
An online sample link to [create an Excel document](https://ej2.syncfusion.com/aspnetcore/Excel/Create#/material3) in ASP.NET Core.