diff --git a/Document-Processing/Excel/Excel-Library/NET/Loading-and-Saving-Workbook.md b/Document-Processing/Excel/Excel-Library/NET/Loading-and-Saving-Workbook.md index fdbfb4e3b..836b43cb8 100644 --- a/Document-Processing/Excel/Excel-Library/NET/Loading-and-Saving-Workbook.md +++ b/Document-Processing/Excel/Excel-Library/NET/Loading-and-Saving-Workbook.md @@ -78,11 +78,8 @@ ExcelEngine excelEngine = new ExcelEngine(); //Initialize IApplication IApplication application = excelEngine.Excel; -//Load the file into stream -FileStream inputStream = new FileStream("Sample.xlsx", FileMode.Open, FileAccess.Read); - //Loads or open an existing workbook through Open method of IWorkbooks -IWorkbook workbook = application.Workbooks.Open(inputStream); +IWorkbook workbook = application.Workbooks.Open("Sample.xlsx"); //To-Do some manipulation //To-Do some manipulation diff --git a/Document-Processing/Excel/Excel-Library/NET/Loading-and-Saving/Loading-and-Saving_images/Loadind-and-Saving-Azure-Functions-v4_img4.png b/Document-Processing/Excel/Excel-Library/NET/Loading-and-Saving/Loading-and-Saving_images/Loadind-and-Saving-Azure-Functions-v4_img4.png index 64f2cf984..8dca76b73 100644 Binary files a/Document-Processing/Excel/Excel-Library/NET/Loading-and-Saving/Loading-and-Saving_images/Loadind-and-Saving-Azure-Functions-v4_img4.png and b/Document-Processing/Excel/Excel-Library/NET/Loading-and-Saving/Loading-and-Saving_images/Loadind-and-Saving-Azure-Functions-v4_img4.png differ diff --git a/Document-Processing/Excel/Excel-Library/NET/Loading-and-Saving/Loading-and-Saving_images/Loadind-and-Saving-Azure-Functions-v4_img5.png b/Document-Processing/Excel/Excel-Library/NET/Loading-and-Saving/Loading-and-Saving_images/Loadind-and-Saving-Azure-Functions-v4_img5.png index 377055340..173f27703 100644 Binary files a/Document-Processing/Excel/Excel-Library/NET/Loading-and-Saving/Loading-and-Saving_images/Loadind-and-Saving-Azure-Functions-v4_img5.png and b/Document-Processing/Excel/Excel-Library/NET/Loading-and-Saving/Loading-and-Saving_images/Loadind-and-Saving-Azure-Functions-v4_img5.png differ diff --git a/Document-Processing/Excel/Excel-Library/NET/Loading-and-Saving/loading-and-saving-excel-files-in-asp-net-core-c-sharp.md b/Document-Processing/Excel/Excel-Library/NET/Loading-and-Saving/loading-and-saving-excel-files-in-asp-net-core-c-sharp.md index 1fed5a84f..1ce9c513c 100644 --- a/Document-Processing/Excel/Excel-Library/NET/Loading-and-Saving/loading-and-saving-excel-files-in-asp-net-core-c-sharp.md +++ b/Document-Processing/Excel/Excel-Library/NET/Loading-and-Saving/loading-and-saving-excel-files-in-asp-net-core-c-sharp.md @@ -1,15 +1,15 @@ --- title: Loading and saving workbook in ASP.NET Core | Syncfusion -description: Explains how to load and save Excel files in ASP.NET Core applications using Syncfusion XlsIO. +description: Explains how to load and save Excel files in ASP.NET Core applications using Syncfusion Excel(XlsIO) library. platform: document-processing control: XlsIO documentation: UG --- # Loading and saving workbook in ASP.NET Core -## Opening an existing workbook from stream +## Opening an existing workbook -You can open an existing workbook from stream by using the overloads of [Open](https://help.syncfusion.com/cr/file-formats/Syncfusion.XlsIO.IWorkbooks.html#Syncfusion_XlsIO_IWorkbooks_Open_System_IO_Stream_) methods of [IWorkbooks](https://help.syncfusion.com/cr/file-formats/Syncfusion.XlsIO.IWorkbooks.html) interface. +You can open an existing workbook by using the overloads of [Open](https://help.syncfusion.com/cr/document-processing/Syncfusion.XlsIO.IWorkbooks.html#Syncfusion_XlsIO_IWorkbooks_Open_System_String_) methods of [IWorkbooks](https://help.syncfusion.com/cr/file-formats/Syncfusion.XlsIO.IWorkbooks.html) interface. {% tabs %} {% highlight c# tabtitle="C# [Cross-platform]" %} @@ -19,17 +19,14 @@ ExcelEngine excelEngine = new ExcelEngine(); //Initialize IApplication IApplication application = excelEngine.Excel; -//Load the file into stream -FileStream inputStream = new FileStream("Sample.xlsx", FileMode.Open, FileAccess.Read); - //Loads or open an existing workbook through Open method of IWorkbooks -IWorkbook workbook = application.Workbooks.Open(inputStream); +IWorkbook workbook = application.Workbooks.Open("Sample.xlsx"); {% endhighlight %} {% endtabs %} -## Saving an Excel workbook to stream +## Saving an Excel workbook -You can also save the created or manipulated workbook to stream using overloads of [SaveAs](https://help.syncfusion.com/cr/file-formats/Syncfusion.XlsIO.IWorkbook.html#Syncfusion_XlsIO_IWorkbook_SaveAs_System_IO_Stream_) methods. +You can also save the created or manipulated workbook using overloads of [SaveAs](https://help.syncfusion.com/cr/document-processing/Syncfusion.XlsIO.IWorkbook.html#Syncfusion_XlsIO_IWorkbook_SaveAs_System_String_) methods. {% tabs %} {% highlight c# tabtitle="C# [Cross-platform]" %} @@ -39,11 +36,8 @@ ExcelEngine excelEngine = new ExcelEngine(); //Initialize IApplication IApplication application = excelEngine.Excel; -//Load the file into stream -FileStream inputStream = new FileStream("Sample.xlsx", FileMode.Open, FileAccess.Read); - //Loads or open an existing workbook through Open method of IWorkbooks -IWorkbook workbook = application.Workbooks.Open(inputStream); +IWorkbook workbook = application.Workbooks.Open("Sample.xlsx"); //To-Do some manipulation //To-Do some manipulation @@ -51,8 +45,7 @@ IWorkbook workbook = application.Workbooks.Open(inputStream); //Set the version of the workbook workbook.Version = ExcelVersion.Xlsx; -//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 %} {% endtabs %} diff --git a/Document-Processing/Excel/Excel-Library/NET/Loading-and-Saving/loading-and-saving-excel-files-in-azure-app-service-windows.md b/Document-Processing/Excel/Excel-Library/NET/Loading-and-Saving/loading-and-saving-excel-files-in-azure-app-service-windows.md index 644fc025a..ba83b91fe 100644 --- a/Document-Processing/Excel/Excel-Library/NET/Loading-and-Saving/loading-and-saving-excel-files-in-azure-app-service-windows.md +++ b/Document-Processing/Excel/Excel-Library/NET/Loading-and-Saving/loading-and-saving-excel-files-in-azure-app-service-windows.md @@ -84,8 +84,7 @@ using (ExcelEngine excelEngine = new ExcelEngine()) application.DefaultVersion = ExcelVersion.Xlsx; //Load an existing Excel document - FileStream inputStream = new FileStream("Data/InputTemplate.xlsx", FileMode.Open, FileAccess.Read); - IWorkbook workbook = application.Workbooks.Open(inputStream); + IWorkbook workbook = application.Workbooks.Open("Data/InputTemplate.xlsx"); //Access first worksheet from the workbook. IWorksheet worksheet = workbook.Worksheets[0]; diff --git a/Document-Processing/Excel/Excel-Library/NET/Loading-and-Saving/loading-and-saving-excel-files-in-azure-functions-v1.md b/Document-Processing/Excel/Excel-Library/NET/Loading-and-Saving/loading-and-saving-excel-files-in-azure-functions-v1.md index a096910f2..8bf7af425 100644 --- a/Document-Processing/Excel/Excel-Library/NET/Loading-and-Saving/loading-and-saving-excel-files-in-azure-functions-v1.md +++ b/Document-Processing/Excel/Excel-Library/NET/Loading-and-Saving/loading-and-saving-excel-files-in-azure-functions-v1.md @@ -1,6 +1,6 @@ --- title: Loading and Saving Excel in Azure Functions v1 | Syncfusion -description: Explains how to load and save an Excel files in Azure Functions v1 using Syncfusion Excel library. +description: Explains how to load and save an Excel files in Azure Functions v1 using Syncfusion Excel(XlsIO) library. platform: document-processing control: XlsIO documentation: UG @@ -49,8 +49,7 @@ using (ExcelEngine excelEngine = new ExcelEngine()) application.DefaultVersion = ExcelVersion.Xlsx; //Load an existing Excel document - FileStream inputStream = new FileStream("Data/InputTemplate.xlsx", FileMode.Open, FileAccess.Read); - IWorkbook workbook = application.Workbooks.Open(inputStream); + IWorkbook workbook = application.Workbooks.Open("Data/InputTemplate.xlsx"); //Access first worksheet from the workbook IWorksheet worksheet = workbook.Worksheets[0]; diff --git a/Document-Processing/Excel/Excel-Library/NET/Loading-and-Saving/loading-and-saving-excel-files-in-azure-functions-v4.md b/Document-Processing/Excel/Excel-Library/NET/Loading-and-Saving/loading-and-saving-excel-files-in-azure-functions-v4.md index 124a989cb..e0f6c4c7d 100644 --- a/Document-Processing/Excel/Excel-Library/NET/Loading-and-Saving/loading-and-saving-excel-files-in-azure-functions-v4.md +++ b/Document-Processing/Excel/Excel-Library/NET/Loading-and-Saving/loading-and-saving-excel-files-in-azure-functions-v4.md @@ -1,6 +1,6 @@ --- title: Loading and Saving Excel in Azure Functions v4 | Syncfusion -description: Explains how to load and save an Excel files in Azure Functions v4 using Syncfusion Excel library. +description: Explains how to load and save an Excel files in Azure Functions v4 using Syncfusion Excel(XlsIO) library. platform: document-processing control: XlsIO documentation: UG @@ -49,8 +49,7 @@ using (ExcelEngine excelEngine = new ExcelEngine()) application.DefaultVersion = ExcelVersion.Xlsx; //Load an existing Excel document - FileStream inputStream = new FileStream("Data/InputTemplate.xlsx", FileMode.Open, FileAccess.Read); - IWorkbook workbook = application.Workbooks.Open(inputStream); + IWorkbook workbook = application.Workbooks.Open("Data/InputTemplate.xlsx"); //Access first worksheet from the workbook IWorksheet worksheet = workbook.Worksheets[0]; diff --git a/Document-Processing/Excel/Excel-Library/NET/Loading-and-Saving/loading-and-saving-excel-files-in-blazor-c-sharp.md b/Document-Processing/Excel/Excel-Library/NET/Loading-and-Saving/loading-and-saving-excel-files-in-blazor-c-sharp.md index e3011c4e8..db4984409 100644 --- a/Document-Processing/Excel/Excel-Library/NET/Loading-and-Saving/loading-and-saving-excel-files-in-blazor-c-sharp.md +++ b/Document-Processing/Excel/Excel-Library/NET/Loading-and-Saving/loading-and-saving-excel-files-in-blazor-c-sharp.md @@ -1,15 +1,15 @@ --- title: Loading and saving workbook in Blazor | Syncfusion -description: Explains how to load and save Excel files in Blazor applications using Syncfusion XlsIO. +description: Explains how to load and save Excel files in Blazor applications using Syncfusion Excel(XlsIO) library. platform: document-processing control: XlsIO documentation: UG --- # Loading and saving workbook in Blazor -## Opening an existing workbook from Stream +## Opening an existing workbook -You can open an existing workbook from stream by using the overloads of [Open](https://help.syncfusion.com/cr/file-formats/Syncfusion.XlsIO.IWorkbooks.html#Syncfusion_XlsIO_IWorkbooks_Open_System_IO_Stream_) methods of [IWorkbooks](https://help.syncfusion.com/cr/file-formats/Syncfusion.XlsIO.IWorkbooks.html) interface. +You can open an existing workbook by using the overloads of [Open](https://help.syncfusion.com/cr/document-processing/Syncfusion.XlsIO.IWorkbooks.html#Syncfusion_XlsIO_IWorkbooks_Open_System_String_) methods of [IWorkbooks](https://help.syncfusion.com/cr/file-formats/Syncfusion.XlsIO.IWorkbooks.html) interface. The code snippet for this process in Blazor Server-Side application is given below. @@ -21,11 +21,8 @@ ExcelEngine excelEngine = new ExcelEngine(); //Initialize IApplication IApplication application = excelEngine.Excel; -//Load the file into stream -FileStream inputStream = new FileStream("Sample.xlsx", FileMode.Open, FileAccess.Read); - //Loads or open an existing workbook through Open method of IWorkbooks -IWorkbook workbook = application.Workbooks.Open(inputStream); +IWorkbook workbook = application.Workbooks.Open("Sample.xlsx"); {% endhighlight %} {% endtabs %} @@ -61,11 +58,8 @@ ExcelEngine excelEngine = new ExcelEngine(); //Initialize IApplication IApplication application = excelEngine.Excel; -//Load the file into stream -FileStream inputStream = new FileStream("Sample.xlsx", FileMode.Open, FileAccess.Read); - //Loads or open an existing workbook through Open method of IWorkbooks -IWorkbook workbook = application.Workbooks.Open(inputStream); +IWorkbook workbook = application.Workbooks.Open("Sample.xlsx"); //To-Do some manipulation //To-Do some manipulation diff --git a/Document-Processing/Excel/Excel-Library/NET/Loading-and-Saving/loading-and-saving-excel-files-in-google-app-engine.md b/Document-Processing/Excel/Excel-Library/NET/Loading-and-Saving/loading-and-saving-excel-files-in-google-app-engine.md index 290311aae..29b05e30d 100644 --- a/Document-Processing/Excel/Excel-Library/NET/Loading-and-Saving/loading-and-saving-excel-files-in-google-app-engine.md +++ b/Document-Processing/Excel/Excel-Library/NET/Loading-and-Saving/loading-and-saving-excel-files-in-google-app-engine.md @@ -1,5 +1,5 @@ --- -title: Loading and Saving Excel in GCP | Syncfusion +title: Loading and Saving Excel in Google App Engine | Syncfusion description: Explains how to load and save an Excel files in Google App Engine using .NET Core Excel (XlsIO) library without Microsoft Excel or interop dependencies. platform: document-processing control: XlsIO @@ -90,8 +90,7 @@ using (ExcelEngine excelEngine = new ExcelEngine()) application.DefaultVersion = ExcelVersion.Xlsx; //Load an existing Excel document - FileStream inputStream = new FileStream("Data/InputTemplate.xlsx", FileMode.Open, FileAccess.Read); - IWorkbook workbook = application.Workbooks.Open(inputStream); + IWorkbook workbook = application.Workbooks.Open("Data/InputTemplate.xlsx"); //Access first worksheet from the workbook. IWorksheet worksheet = workbook.Worksheets[0]; diff --git a/Document-Processing/Excel/Excel-Library/NET/Loading-and-Saving/loading-and-saving-excel-files-in-linux-c-sharp.md b/Document-Processing/Excel/Excel-Library/NET/Loading-and-Saving/loading-and-saving-excel-files-in-linux-c-sharp.md index 182ba39d1..adf935079 100644 --- a/Document-Processing/Excel/Excel-Library/NET/Loading-and-Saving/loading-and-saving-excel-files-in-linux-c-sharp.md +++ b/Document-Processing/Excel/Excel-Library/NET/Loading-and-Saving/loading-and-saving-excel-files-in-linux-c-sharp.md @@ -1,15 +1,15 @@ --- title: Loading and saving workbook on Linux | Syncfusion -description: Explains how to load and save Excel files on Linux applications using Syncfusion XlsIO. +description: Explains how to load and save Excel files on Linux applications using Syncfusion Excel(XlsIO) library. platform: document-processing control: XlsIO documentation: UG --- # Loading and saving workbook on Linux -## Opening an existing workbook from stream +## Opening an existing workbook -You can open an existing workbook from stream by using the overloads of [Open](https://help.syncfusion.com/cr/file-formats/Syncfusion.XlsIO.IWorkbooks.html#Syncfusion_XlsIO_IWorkbooks_Open_System_IO_Stream_) methods of [IWorkbooks](https://help.syncfusion.com/cr/file-formats/Syncfusion.XlsIO.IWorkbooks.html) interface. +You can open an existing workbook by using the overloads of [Open](https://help.syncfusion.com/cr/document-processing/Syncfusion.XlsIO.IWorkbooks.html#Syncfusion_XlsIO_IWorkbooks_Open_System_String_) methods of [IWorkbooks](https://help.syncfusion.com/cr/file-formats/Syncfusion.XlsIO.IWorkbooks.html) interface. {% tabs %} {% highlight c# tabtitle="C# [Cross-platform]" %} @@ -19,15 +19,14 @@ ExcelEngine excelEngine = new ExcelEngine(); //Initialize IApplication IApplication application = excelEngine.Excel; -//A existing workbook is opened. -FileStream inputStream = new FileStream("Sample.xlsx", FileMode.Open, FileAccess.Read); -IWorkbook workbook = application.Workbooks.Open(inputStream); +//A existing workbook is opened. +IWorkbook workbook = application.Workbooks.Open("Sample.xlsx"); {% endhighlight %} {% endtabs %} -## Saving an Excel workbook to stream +## Saving an Excel workbook -You can also save the created or manipulated workbook to stream using overloads of [SaveAs](https://help.syncfusion.com/cr/file-formats/Syncfusion.XlsIO.IWorkbook.html#Syncfusion_XlsIO_IWorkbook_SaveAs_System_IO_Stream_) methods. +You can also save the created or manipulated workbook using overloads of [SaveAs](https://help.syncfusion.com/cr/document-processing/Syncfusion.XlsIO.IWorkbook.html#Syncfusion_XlsIO_IWorkbook_SaveAs_System_String_) methods. {% tabs %} {% highlight c# tabtitle="C# [Cross-platform]" %} @@ -37,9 +36,8 @@ ExcelEngine excelEngine = new ExcelEngine(); //Initialize IApplication IApplication application = excelEngine.Excel; -//A existing workbook is opened. -FileStream inputStream = new FileStream("Sample.xlsx", FileMode.Open, FileAccess.Read); -IWorkbook workbook = application.Workbooks.Open(inputStream); +//A existing workbook is opened. +IWorkbook workbook = application.Workbooks.Open("Sample.xlsx"); //To-Do some manipulation //To-Do some manipulation @@ -47,10 +45,7 @@ IWorkbook workbook = application.Workbooks.Open(inputStream); //Set the version of the workbook workbook.Version = ExcelVersion.Xlsx; -//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"); {% endhighlight %} {% endtabs %} diff --git a/Document-Processing/Excel/Excel-Library/NET/Loading-and-Saving/loading-and-saving-excel-files-in-mac-c-sharp.md b/Document-Processing/Excel/Excel-Library/NET/Loading-and-Saving/loading-and-saving-excel-files-in-mac-c-sharp.md index 2ff41f873..01a308453 100644 --- a/Document-Processing/Excel/Excel-Library/NET/Loading-and-Saving/loading-and-saving-excel-files-in-mac-c-sharp.md +++ b/Document-Processing/Excel/Excel-Library/NET/Loading-and-Saving/loading-and-saving-excel-files-in-mac-c-sharp.md @@ -7,9 +7,9 @@ documentation: UG --- # Loading and saving workbook on Mac OS -## Opening an existing workbook from stream +## Opening an existing workbook -You can open an existing workbook from stream by using the overloads of [Open](https://help.syncfusion.com/cr/file-formats/Syncfusion.XlsIO.IWorkbooks.html#Syncfusion_XlsIO_IWorkbooks_Open_System_IO_Stream_) methods of [IWorkbooks](https://help.syncfusion.com/cr/file-formats/Syncfusion.XlsIO.IWorkbooks.html) interface. +You can open an existing workbook by using the overloads of [Open](https://help.syncfusion.com/cr/document-processing/Syncfusion.XlsIO.IWorkbooks.html#Syncfusion_XlsIO_IWorkbooks_Open_System_String_) methods of [IWorkbooks](https://help.syncfusion.com/cr/file-formats/Syncfusion.XlsIO.IWorkbooks.html) interface. {% tabs %} {% highlight c# tabtitle="C# [Cross-platform]" %} @@ -19,18 +19,14 @@ ExcelEngine excelEngine = new ExcelEngine(); //Initialize IApplication IApplication application = excelEngine.Excel; -//Load the file into stream -Assembly executingAssembly = typeof(Program).GetTypeInfo().Assembly; -Stream inputStream = executingAssembly.GetManifestResourceStream("XlsIOSample.Sample.xlsx"); - //Loads or open an existing workbook through Open method of IWorkbooks -IWorkbook workbook = application.Workbooks.Open(inputStream); +IWorkbook workbook = application.Workbooks.Open("XlsIOSample/Sample.xlsx"); {% endhighlight %} {% endtabs %} -## Saving an Excel workbook to stream +## Saving an Excel workbook -You can also save the created or manipulated workbook to stream using overloads of [SaveAs](https://help.syncfusion.com/cr/file-formats/Syncfusion.XlsIO.IWorkbook.html#Syncfusion_XlsIO_IWorkbook_SaveAs_System_IO_Stream_) methods. +You can also save the created or manipulated workbook using overloads of [SaveAs](https://help.syncfusion.com/cr/document-processing/Syncfusion.XlsIO.IWorkbook.html#Syncfusion_XlsIO_IWorkbook_SaveAs_System_String_) methods. {% tabs %} {% highlight c# tabtitle="C# [Cross-platform]" %} @@ -40,11 +36,8 @@ ExcelEngine excelEngine = new ExcelEngine(); //Initialize IApplication IApplication application = excelEngine.Excel; -//Load the file into stream -FileStream inputStream = new FileStream("Sample.xlsx", FileMode.Open, FileAccess.Read); - //Loads or open an existing workbook through Open method of IWorkbooks -IWorkbook workbook = application.Workbooks.Open(inputStream); +IWorkbook workbook = application.Workbooks.Open("Sample.xlsx"); //To-Do some manipulation //To-Do some manipulation @@ -52,10 +45,7 @@ IWorkbook workbook = application.Workbooks.Open(inputStream); //Set the version of the workbook workbook.Version = ExcelVersion.Xlsx; -//Initialize stream -FileStream outputStream = new FileStream("Output.xlsx", FileMode.Create); - //Save the workbook as stream -workbook.SaveAs(outputStream); +workbook.SaveAs("Output.xlsx"); {% endhighlight %} {% endtabs %}