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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions File-Formats-toc.html
Original file line number Diff line number Diff line change
Expand Up @@ -1688,6 +1688,7 @@
<li><a href="/file-formats/xlsio/faqs/how-to-fix-the-argument-out-of-range-exception-when-accessing-a-large-number-of-rows-and-columns">How to fix the ArgumentOutOfRangeException when accessing a large number of rows and columns?</a></li>
<li><a href="/file-formats/xlsio/faqs/how-to-set-logarithmic-axis-for-chart-in-excel-document">How to set Logarithmic axis for chart in Excel document?</a></li>
<li><a href="/file-formats/xlsio/faqs/how-to-resolve-performance-issue-when-deleting-a-large-number-of-rows">How to resolve performance issue when deleting a large number of rows?</a></li>
<li><a href="/file-formats/xlsio/faqs/how-to-hide-columns-using-column-name">How to hide columns using column name?</a></li>
</ul>
</li>
</ul>
Expand Down
45 changes: 36 additions & 9 deletions File-Formats/DocIO/Working-with-Word-document.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,18 @@ using (WordDocument document = new WordDocument(sourceStreamPath, FormatType.Aut
//Accesses the built-in document properties
Console.WriteLine("Title - {0}",document.BuiltinDocumentProperties.Title);
Console.WriteLine("Author - {0}", document.BuiltinDocumentProperties.Author);
//Modifies or sets the category and company Built-in document properties
document.BuiltinDocumentProperties.Category = "Sales reports";
document.BuiltinDocumentProperties.Company = "Northwind traders";
//Modifies or sets the Built-in document properties.
document.BuiltinDocumentProperties.Author = "Andrew";
document.BuiltinDocumentProperties.LastAuthor = "Steven";
document.BuiltinDocumentProperties.CreateDate = new DateTime(1900, 12, 31, 12, 0, 0);
document.BuiltinDocumentProperties.LastSaveDate = new DateTime(1900, 12, 31, 12, 0, 0);
document.BuiltinDocumentProperties.LastPrinted = new DateTime(1900, 12, 31, 12, 0, 0);
document.BuiltinDocumentProperties.Title = "Sample Document";
document.BuiltinDocumentProperties.Subject = "Adventure Works Cycle";
document.BuiltinDocumentProperties.Category = "Technical documentation";
document.BuiltinDocumentProperties.Comments = "This is sample document.";
document.BuiltinDocumentProperties.RevisionNumber = "2";
document.BuiltinDocumentProperties.Company = "Adventure Works Cycle";
//Saves and closes the destination document to MemoryStream
MemoryStream stream = new MemoryStream();
document.Save(stream, FormatType.Docx);
Expand All @@ -264,9 +273,18 @@ WordDocument document = new WordDocument(inputFileName);
//Accesses the built-in document properties
Console.WriteLine("Title - {0}",document.BuiltinDocumentProperties.Title);
Console.WriteLine("Author - {0}", document.BuiltinDocumentProperties.Author);
//Modifies or sets the category and company Built-in document properties
document.BuiltinDocumentProperties.Category = "Sales reports";
document.BuiltinDocumentProperties.Company = "Northwind traders";
//Modifies or sets the Built-in document properties.
document.BuiltinDocumentProperties.Author = "Andrew";
document.BuiltinDocumentProperties.LastAuthor = "Steven";
document.BuiltinDocumentProperties.CreateDate = new DateTime(1900, 12, 31, 12, 0, 0);
document.BuiltinDocumentProperties.LastSaveDate = new DateTime(1900, 12, 31, 12, 0, 0);
document.BuiltinDocumentProperties.LastPrinted = new DateTime(1900, 12, 31, 12, 0, 0);
document.BuiltinDocumentProperties.Title = "Sample Document";
document.BuiltinDocumentProperties.Subject = "Adventure Works Cycle";
document.BuiltinDocumentProperties.Category = "Technical documentation";
document.BuiltinDocumentProperties.Comments = "This is sample document.";
document.BuiltinDocumentProperties.RevisionNumber = "2";
document.BuiltinDocumentProperties.Company = "Adventure Works Cycle";
document.Save(outputFileName, FormatType.Docx);
document.Close();
{% endhighlight %}
Expand All @@ -277,9 +295,18 @@ Dim document As New WordDocument(inputFileName)
'Accesses the built-in document properties
Console.WriteLine("Title - {0}", document.BuiltinDocumentProperties.Title)
Console.WriteLine("Author - {0}", document.BuiltinDocumentProperties.Author)
'Modifies or sets the category and company Built-in document properties
document.BuiltinDocumentProperties.Category = "Sales reports"
document.BuiltinDocumentProperties.Company = "Northwind traders"
'Modifies or sets the Built-in document properties.
document.BuiltinDocumentProperties.Author = "Andrew";
document.BuiltinDocumentProperties.LastAuthor = "Steven";
document.BuiltinDocumentProperties.CreateDate = new DateTime(1900, 12, 31, 12, 0, 0);
document.BuiltinDocumentProperties.LastSaveDate = new DateTime(1900, 12, 31, 12, 0, 0);
document.BuiltinDocumentProperties.LastPrinted = new DateTime(1900, 12, 31, 12, 0, 0);
document.BuiltinDocumentProperties.Title = "Sample Document";
document.BuiltinDocumentProperties.Subject = "Adventure Works Cycle";
document.BuiltinDocumentProperties.Category = "Technical documentation";
document.BuiltinDocumentProperties.Comments = "This is sample document.";
document.BuiltinDocumentProperties.RevisionNumber = "2";
document.BuiltinDocumentProperties.Company = "Adventure Works Cycle";
'Saves and closes the document
document.Save(outputFileName, FormatType.Docx)
document.Close()
Expand Down
98 changes: 98 additions & 0 deletions File-Formats/Release-Notes/v25.1.40.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
---
title : Essential Studio for File Formats Weekly Nuget Release Release Notes
description : Essential Studio for File Formats Weekly Nuget Release Release Notes
platform : file-formats
documentation: ug
---

# Essential Studio for File Formats Release Notes

{% include release-info.html date="April 16, 2024" version="v25.1.40" %}


## DocIO

* [EJ2 ASP.NET Core Release Notes](https://ej2.syncfusion.com/aspnetcore/documentation/release-notes/25.1.40#docio){:target="_blank"}
* [EJ2 ASP.NET MVC Release Notes](https://ej2.syncfusion.com/aspnetmvc/documentation/release-notes/25.1.40#docio){:target="_blank"}
* [EJ2 Angular Release Notes](https://ej2.syncfusion.com/angular/documentation/release-notes/25.1.40#docio){:target="_blank"}
* [Blazor Release Notes](https://blazor.syncfusion.com/documentation/release-notes/25.1.40#docio){:target="_blank"}
* [EJ2 React Release Notes](https://ej2.syncfusion.com/react/documentation/release-notes/25.1.40#docio){:target="_blank"}
* [EJ2 Vue Release Notes](https://ej2.syncfusion.com/vue/documentation/release-notes/25.1.40#docio){:target="_blank"}
* [EJ2 JavaScript Release Notes](https://ej2.syncfusion.com/javascript/documentation/release-notes/25.1.40#docio){:target="_blank"}
* [EJ2 TypeScript Release Notes](https://ej2.syncfusion.com/documentation/release-notes/25.1.40#docio){:target="_blank"}
* [.NET MAUI Release Notes](/maui/release-notes/v25.1.40#docio){:target="_blank"}
* [Xamarin.Forms Release Notes](/xamarin/release-notes/v25.1.40#docio){:target="_blank"}
* [Xamarin.Android Release Notes](/xamarin-android/release-notes/v25.1.40#docio){:target="_blank"}
* [Xamarin.iOS Release Notes](/xamarin-ios/release-notes/v25.1.40#docio){:target="_blank"}
* [Flutter Release Notes](/flutter/release-notes/v25.1.40#docio){:target="_blank"}
* [WinUI Release Notes](/winui/release-notes/v25.1.40#docio){:target="_blank"}
* [UWP Release Notes](/uwp/release-notes/v25.1.40#docio){:target="_blank"}
* [Windows Forms Release Notes](/windowsforms/release-notes/v25.1.40#docio){:target="_blank"}
* [WPF Release Notes](/wpf/release-notes/v25.1.40#docio){:target="_blank"}



## PDF

* [EJ2 ASP.NET Core Release Notes](https://ej2.syncfusion.com/aspnetcore/documentation/release-notes/25.1.40#pdf){:target="_blank"}
* [EJ2 ASP.NET MVC Release Notes](https://ej2.syncfusion.com/aspnetmvc/documentation/release-notes/25.1.40#pdf){:target="_blank"}
* [EJ2 Angular Release Notes](https://ej2.syncfusion.com/angular/documentation/release-notes/25.1.40#pdf){:target="_blank"}
* [Blazor Release Notes](https://blazor.syncfusion.com/documentation/release-notes/25.1.40#pdf){:target="_blank"}
* [EJ2 React Release Notes](https://ej2.syncfusion.com/react/documentation/release-notes/25.1.40#pdf){:target="_blank"}
* [EJ2 Vue Release Notes](https://ej2.syncfusion.com/vue/documentation/release-notes/25.1.40#pdf){:target="_blank"}
* [EJ2 JavaScript Release Notes](https://ej2.syncfusion.com/javascript/documentation/release-notes/25.1.40#pdf){:target="_blank"}
* [EJ2 TypeScript Release Notes](https://ej2.syncfusion.com/documentation/release-notes/25.1.40#pdf){:target="_blank"}
* [.NET MAUI Release Notes](/maui/release-notes/v25.1.40#pdf){:target="_blank"}
* [Xamarin.Forms Release Notes](/xamarin/release-notes/v25.1.40#pdf){:target="_blank"}
* [Xamarin.Android Release Notes](/xamarin-android/release-notes/v25.1.40#pdf){:target="_blank"}
* [Xamarin.iOS Release Notes](/xamarin-ios/release-notes/v25.1.40#pdf){:target="_blank"}
* [Flutter Release Notes](/flutter/release-notes/v25.1.40#pdf){:target="_blank"}
* [WinUI Release Notes](/winui/release-notes/v25.1.40#pdf){:target="_blank"}
* [UWP Release Notes](/uwp/release-notes/v25.1.40#pdf){:target="_blank"}
* [Windows Forms Release Notes](/windowsforms/release-notes/v25.1.40#pdf){:target="_blank"}
* [WPF Release Notes](/wpf/release-notes/v25.1.40#pdf){:target="_blank"}


## Presentation

* [EJ2 ASP.NET Core Release Notes](https://ej2.syncfusion.com/aspnetcore/documentation/release-notes/25.1.40#presentation){:target="_blank"}
* [EJ2 ASP.NET MVC Release Notes](https://ej2.syncfusion.com/aspnetmvc/documentation/release-notes/25.1.40#presentation){:target="_blank"}
* [Blazor Release Notes](https://blazor.syncfusion.com/documentation/release-notes/25.1.40#presentation){:target="_blank"}
* [EJ2 Angular Release Notes](https://ej2.syncfusion.com/angular/documentation/release-notes/25.1.40#presentation){:target="_blank"}
* [EJ2 React Release Notes](https://ej2.syncfusion.com/react/documentation/release-notes/25.1.40#presentation){:target="_blank"}
* [EJ2 Vue Release Notes](https://ej2.syncfusion.com/vue/documentation/release-notes/25.1.40#presentation){:target="_blank"}
* [EJ2 JavaScript Release Notes](https://ej2.syncfusion.com/javascript/documentation/release-notes/25.1.40#presentation){:target="_blank"}
* [EJ2 TypeScript Release Notes](https://ej2.syncfusion.com/documentation/release-notes/25.1.40#presentation){:target="_blank"}
* [.NET MAUI Release Notes](/maui/release-notes/v25.1.40#presentation){:target="_blank"}
* [Xamarin.Forms Release Notes](/xamarin/release-notes/v25.1.40#presentation){:target="_blank"}
* [Xamarin.Android Release Notes](/xamarin-android/release-notes/v25.1.40#presentation){:target="_blank"}
* [Xamarin.iOS Release Notes](/xamarin-ios/release-notes/v25.1.40#presentation){:target="_blank"}
* [Flutter Release Notes](/flutter/release-notes/v25.1.40#presentation){:target="_blank"}
* [WinUI Release Notes](/winui/release-notes/v25.1.40#presentation){:target="_blank"}
* [Windows Forms Release Notes](/windowsforms/release-notes/v25.1.40#presentation){:target="_blank"}
* [WPF Release Notes](/wpf/release-notes/v25.1.40#presentation){:target="_blank"}
* [UWP Release Notes](/uwp/release-notes/v25.1.40#presentation){:target="_blank"}



## XlsIO

* [EJ2 ASP.NET Core Release Notes](https://ej2.syncfusion.com/aspnetcore/documentation/release-notes/25.1.40#xlsio){:target="_blank"}
* [EJ2 ASP.NET MVC Release Notes](https://ej2.syncfusion.com/aspnetmvc/documentation/release-notes/25.1.40#xlsio){:target="_blank"}
* [EJ2 Angular Release Notes](https://ej2.syncfusion.com/angular/documentation/release-notes/25.1.40#xlsio){:target="_blank"}
* [Blazor Release Notes](https://blazor.syncfusion.com/documentation/release-notes/25.1.40#xlsio){:target="_blank"}
* [EJ2 React Release Notes](https://ej2.syncfusion.com/react/documentation/release-notes/25.1.40#xlsio){:target="_blank"}
* [EJ2 Vue Release Notes](https://ej2.syncfusion.com/vue/documentation/release-notes/25.1.40#xlsio){:target="_blank"}
* [EJ2 JavaScript Release Notes](https://ej2.syncfusion.com/javascript/documentation/release-notes/25.1.40#xlsio){:target="_blank"}
* [EJ2 TypeScript Release Notes](https://ej2.syncfusion.com/documentation/release-notes/25.1.40#xlsio){:target="_blank"}
* [.NET MAUI Release Notes](/maui/release-notes/v25.1.40#xlsio){:target="_blank"}
* [Xamarin.Forms Release Notes](/xamarin/release-notes/v25.1.40#xlsio){:target="_blank"}
* [Xamarin.Android Release Notes](/xamarin-android/release-notes/v25.1.40#xlsio){:target="_blank"}
* [Xamarin.iOS Release Notes](/xamarin-ios/release-notes/v25.1.40#xlsio){:target="_blank"}
* [Flutter Release Notes](/flutter/release-notes/v25.1.40#xlsio){:target="_blank"}
* [WinUI Release Notes](/winui/release-notes/v25.1.40#xlsio){:target="_blank"}
* [UWP Release Notes](/uwp/release-notes/v25.1.40#xlsio){:target="_blank"}
* [Windows Forms Release Notes](/windowsforms/release-notes/v25.1.40#xlsio){:target="_blank"}
* [WPF Release Notes](/wpf/release-notes/v25.1.40#xlsio){:target="_blank"}


3 changes: 2 additions & 1 deletion File-Formats/XlsIO/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,5 @@ The frequently asked questions in Essential XlsIO are listed below.
* [How to find and replace text in hyperlinks?](faqs/how-to-find-and-replace-text-in-hyperlinks)
* [How to fix the ArgumentOutOfRangeException when accessing a large number of rows and columns?](faqs/how-to-fix-the-argument-out-of-range-exception-when-accessing-a-large-number-of-rows-and-columns)
* [How to set Logarithmic axis for chart in Excel document?](faqs/how-to-set-logarithmic-axis-for-chart-in-excel-document)
* [How to resolve performance issue when deleting a large number of rows?](faqs/how-to-resolve-performance-issue-when-deleting-a-large-number-of-rows)
* [How to resolve performance issue when deleting a large number of rows?](faqs/how-to-resolve-performance-issue-when-deleting-a-large-number-of-rows)
* [How to hide columns using column name](faqs/how-to-hide-columns-using-column-name)
100 changes: 100 additions & 0 deletions File-Formats/XlsIO/faqs/how-to-hide-columns-using-column-name.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
---
title: How to hide columns using column name |Syncfusion.
description: This page explains how to hide columns using column name using Syncfusion .NET Excel library (XlsIO).
platform: file-formats
control: XlsIO
documentation: UG
---

# How to hide columns using column name?

The following code illustrates how to hide columns using column name.

{% tabs %}
{% highlight c# tabtitle="C# [Cross-platform]" %}
using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;

//Loads an existing file
FileStream inputStream = new FileStream("InputTemplate.xlsx", FileMode.Open, FileAccess.Read);
IWorkbook workbook = application.Workbooks.Open(inputStream);
IWorksheet worksheet = workbook.Worksheets[0];

List<string> columnsToHide = new List<string> { "column1", "column2", "column3" };

foreach (string columnName in columnsToHide)
{
IRange headerCell = worksheet.UsedRange.FindFirst(columnName, ExcelFindType.Text);
if (headerCell != null)
{
int columnIndex = headerCell.Column;

// Hide the column
worksheet.ShowColumn(columnIndex, false);
}
}

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

{% highlight c# tabtitle="C# [Windows-specific]" %}
using (ExcelEngine excelEngine = new ExcelEngine())
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;

//Loads an existing file
IWorkbook workbook = application.Workbooks.Open("InputTemplate.xlsx");
IWorksheet worksheet = workbook.Worksheets[0];

List<string> columnsToHide = new List<string> { "column1", "column2", "column3" };

foreach (string columnName in columnsToHide)
{
IRange headerCell = worksheet.UsedRange.FindFirst(columnName, ExcelFindType.Text);
if (headerCell != null)
{
int columnIndex = headerCell.Column;

// Hide the column
worksheet.ShowColumn(columnIndex, false);
}
}

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

{% highlight vb.net tabtitle="VB.NET [Windows-specific]" %}
Using excelEngine As ExcelEngine = New ExcelEngine()
Dim application As IApplication = excelEngine.Excel
application.DefaultVersion = ExcelVersion.Xlsx

' Loads an existing file
Dim workbook As IWorkbook = application.Workbooks.Open("InputTemplate.xlsx")
Dim worksheet As IWorksheet = workbook.Worksheets(0)

Dim columnsToHide As List(Of String) = New List(Of String) From {"column1", "column2", "column3"}

For Each columnName As String In columnsToHide
Dim headerCell As IRange = worksheet.UsedRange.FindFirst(columnName, ExcelFindType.Text)
If headerCell IsNot Nothing Then
Dim columnIndex As Integer = headerCell.Column

' Hide the column
worksheet.ShowColumn(columnIndex, False)
End If
Next

' Saving the workbook
workbook.SaveAs("Output.xlsx")
End Using
{% endhighlight %}
{% endtabs %}
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ using(ExcelEngine excelEngine = new ExcelEngine())
//Remove the worksheet
workbook.Worksheets[0].Remove();

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