Skip to content

Commit 151367c

Browse files
Merge pull request #2055 from Syncfusion-Content/hotfix/hotfix-v25.1.35
DOCINFRA-2341_merged_using_automation
2 parents 5f36487 + f5c205d commit 151367c

File tree

6 files changed

+238
-11
lines changed

6 files changed

+238
-11
lines changed

File-Formats-toc.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1688,6 +1688,7 @@
16881688
<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>
16891689
<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>
16901690
<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>
1691+
<li><a href="/file-formats/xlsio/faqs/how-to-hide-columns-using-column-name">How to hide columns using column name?</a></li>
16911692
</ul>
16921693
</li>
16931694
</ul>

File-Formats/DocIO/Working-with-Word-document.md

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,18 @@ using (WordDocument document = new WordDocument(sourceStreamPath, FormatType.Aut
248248
//Accesses the built-in document properties
249249
Console.WriteLine("Title - {0}",document.BuiltinDocumentProperties.Title);
250250
Console.WriteLine("Author - {0}", document.BuiltinDocumentProperties.Author);
251-
//Modifies or sets the category and company Built-in document properties
252-
document.BuiltinDocumentProperties.Category = "Sales reports";
253-
document.BuiltinDocumentProperties.Company = "Northwind traders";
251+
//Modifies or sets the Built-in document properties.
252+
document.BuiltinDocumentProperties.Author = "Andrew";
253+
document.BuiltinDocumentProperties.LastAuthor = "Steven";
254+
document.BuiltinDocumentProperties.CreateDate = new DateTime(1900, 12, 31, 12, 0, 0);
255+
document.BuiltinDocumentProperties.LastSaveDate = new DateTime(1900, 12, 31, 12, 0, 0);
256+
document.BuiltinDocumentProperties.LastPrinted = new DateTime(1900, 12, 31, 12, 0, 0);
257+
document.BuiltinDocumentProperties.Title = "Sample Document";
258+
document.BuiltinDocumentProperties.Subject = "Adventure Works Cycle";
259+
document.BuiltinDocumentProperties.Category = "Technical documentation";
260+
document.BuiltinDocumentProperties.Comments = "This is sample document.";
261+
document.BuiltinDocumentProperties.RevisionNumber = "2";
262+
document.BuiltinDocumentProperties.Company = "Adventure Works Cycle";
254263
//Saves and closes the destination document to MemoryStream
255264
MemoryStream stream = new MemoryStream();
256265
document.Save(stream, FormatType.Docx);
@@ -264,9 +273,18 @@ WordDocument document = new WordDocument(inputFileName);
264273
//Accesses the built-in document properties
265274
Console.WriteLine("Title - {0}",document.BuiltinDocumentProperties.Title);
266275
Console.WriteLine("Author - {0}", document.BuiltinDocumentProperties.Author);
267-
//Modifies or sets the category and company Built-in document properties
268-
document.BuiltinDocumentProperties.Category = "Sales reports";
269-
document.BuiltinDocumentProperties.Company = "Northwind traders";
276+
//Modifies or sets the Built-in document properties.
277+
document.BuiltinDocumentProperties.Author = "Andrew";
278+
document.BuiltinDocumentProperties.LastAuthor = "Steven";
279+
document.BuiltinDocumentProperties.CreateDate = new DateTime(1900, 12, 31, 12, 0, 0);
280+
document.BuiltinDocumentProperties.LastSaveDate = new DateTime(1900, 12, 31, 12, 0, 0);
281+
document.BuiltinDocumentProperties.LastPrinted = new DateTime(1900, 12, 31, 12, 0, 0);
282+
document.BuiltinDocumentProperties.Title = "Sample Document";
283+
document.BuiltinDocumentProperties.Subject = "Adventure Works Cycle";
284+
document.BuiltinDocumentProperties.Category = "Technical documentation";
285+
document.BuiltinDocumentProperties.Comments = "This is sample document.";
286+
document.BuiltinDocumentProperties.RevisionNumber = "2";
287+
document.BuiltinDocumentProperties.Company = "Adventure Works Cycle";
270288
document.Save(outputFileName, FormatType.Docx);
271289
document.Close();
272290
{% endhighlight %}
@@ -277,9 +295,18 @@ Dim document As New WordDocument(inputFileName)
277295
'Accesses the built-in document properties
278296
Console.WriteLine("Title - {0}", document.BuiltinDocumentProperties.Title)
279297
Console.WriteLine("Author - {0}", document.BuiltinDocumentProperties.Author)
280-
'Modifies or sets the category and company Built-in document properties
281-
document.BuiltinDocumentProperties.Category = "Sales reports"
282-
document.BuiltinDocumentProperties.Company = "Northwind traders"
298+
'Modifies or sets the Built-in document properties.
299+
document.BuiltinDocumentProperties.Author = "Andrew";
300+
document.BuiltinDocumentProperties.LastAuthor = "Steven";
301+
document.BuiltinDocumentProperties.CreateDate = new DateTime(1900, 12, 31, 12, 0, 0);
302+
document.BuiltinDocumentProperties.LastSaveDate = new DateTime(1900, 12, 31, 12, 0, 0);
303+
document.BuiltinDocumentProperties.LastPrinted = new DateTime(1900, 12, 31, 12, 0, 0);
304+
document.BuiltinDocumentProperties.Title = "Sample Document";
305+
document.BuiltinDocumentProperties.Subject = "Adventure Works Cycle";
306+
document.BuiltinDocumentProperties.Category = "Technical documentation";
307+
document.BuiltinDocumentProperties.Comments = "This is sample document.";
308+
document.BuiltinDocumentProperties.RevisionNumber = "2";
309+
document.BuiltinDocumentProperties.Company = "Adventure Works Cycle";
283310
'Saves and closes the document
284311
document.Save(outputFileName, FormatType.Docx)
285312
document.Close()
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
---
2+
title : Essential Studio for File Formats Weekly Nuget Release Release Notes
3+
description : Essential Studio for File Formats Weekly Nuget Release Release Notes
4+
platform : file-formats
5+
documentation: ug
6+
---
7+
8+
# Essential Studio for File Formats Release Notes
9+
10+
{% include release-info.html date="April 16, 2024" version="v25.1.40" %}
11+
12+
13+
## DocIO
14+
15+
* [EJ2 ASP.NET Core Release Notes](https://ej2.syncfusion.com/aspnetcore/documentation/release-notes/25.1.40#docio){:target="_blank"}
16+
* [EJ2 ASP.NET MVC Release Notes](https://ej2.syncfusion.com/aspnetmvc/documentation/release-notes/25.1.40#docio){:target="_blank"}
17+
* [EJ2 Angular Release Notes](https://ej2.syncfusion.com/angular/documentation/release-notes/25.1.40#docio){:target="_blank"}
18+
* [Blazor Release Notes](https://blazor.syncfusion.com/documentation/release-notes/25.1.40#docio){:target="_blank"}
19+
* [EJ2 React Release Notes](https://ej2.syncfusion.com/react/documentation/release-notes/25.1.40#docio){:target="_blank"}
20+
* [EJ2 Vue Release Notes](https://ej2.syncfusion.com/vue/documentation/release-notes/25.1.40#docio){:target="_blank"}
21+
* [EJ2 JavaScript Release Notes](https://ej2.syncfusion.com/javascript/documentation/release-notes/25.1.40#docio){:target="_blank"}
22+
* [EJ2 TypeScript Release Notes](https://ej2.syncfusion.com/documentation/release-notes/25.1.40#docio){:target="_blank"}
23+
* [.NET MAUI Release Notes](/maui/release-notes/v25.1.40#docio){:target="_blank"}
24+
* [Xamarin.Forms Release Notes](/xamarin/release-notes/v25.1.40#docio){:target="_blank"}
25+
* [Xamarin.Android Release Notes](/xamarin-android/release-notes/v25.1.40#docio){:target="_blank"}
26+
* [Xamarin.iOS Release Notes](/xamarin-ios/release-notes/v25.1.40#docio){:target="_blank"}
27+
* [Flutter Release Notes](/flutter/release-notes/v25.1.40#docio){:target="_blank"}
28+
* [WinUI Release Notes](/winui/release-notes/v25.1.40#docio){:target="_blank"}
29+
* [UWP Release Notes](/uwp/release-notes/v25.1.40#docio){:target="_blank"}
30+
* [Windows Forms Release Notes](/windowsforms/release-notes/v25.1.40#docio){:target="_blank"}
31+
* [WPF Release Notes](/wpf/release-notes/v25.1.40#docio){:target="_blank"}
32+
33+
34+
35+
## PDF
36+
37+
* [EJ2 ASP.NET Core Release Notes](https://ej2.syncfusion.com/aspnetcore/documentation/release-notes/25.1.40#pdf){:target="_blank"}
38+
* [EJ2 ASP.NET MVC Release Notes](https://ej2.syncfusion.com/aspnetmvc/documentation/release-notes/25.1.40#pdf){:target="_blank"}
39+
* [EJ2 Angular Release Notes](https://ej2.syncfusion.com/angular/documentation/release-notes/25.1.40#pdf){:target="_blank"}
40+
* [Blazor Release Notes](https://blazor.syncfusion.com/documentation/release-notes/25.1.40#pdf){:target="_blank"}
41+
* [EJ2 React Release Notes](https://ej2.syncfusion.com/react/documentation/release-notes/25.1.40#pdf){:target="_blank"}
42+
* [EJ2 Vue Release Notes](https://ej2.syncfusion.com/vue/documentation/release-notes/25.1.40#pdf){:target="_blank"}
43+
* [EJ2 JavaScript Release Notes](https://ej2.syncfusion.com/javascript/documentation/release-notes/25.1.40#pdf){:target="_blank"}
44+
* [EJ2 TypeScript Release Notes](https://ej2.syncfusion.com/documentation/release-notes/25.1.40#pdf){:target="_blank"}
45+
* [.NET MAUI Release Notes](/maui/release-notes/v25.1.40#pdf){:target="_blank"}
46+
* [Xamarin.Forms Release Notes](/xamarin/release-notes/v25.1.40#pdf){:target="_blank"}
47+
* [Xamarin.Android Release Notes](/xamarin-android/release-notes/v25.1.40#pdf){:target="_blank"}
48+
* [Xamarin.iOS Release Notes](/xamarin-ios/release-notes/v25.1.40#pdf){:target="_blank"}
49+
* [Flutter Release Notes](/flutter/release-notes/v25.1.40#pdf){:target="_blank"}
50+
* [WinUI Release Notes](/winui/release-notes/v25.1.40#pdf){:target="_blank"}
51+
* [UWP Release Notes](/uwp/release-notes/v25.1.40#pdf){:target="_blank"}
52+
* [Windows Forms Release Notes](/windowsforms/release-notes/v25.1.40#pdf){:target="_blank"}
53+
* [WPF Release Notes](/wpf/release-notes/v25.1.40#pdf){:target="_blank"}
54+
55+
56+
## Presentation
57+
58+
* [EJ2 ASP.NET Core Release Notes](https://ej2.syncfusion.com/aspnetcore/documentation/release-notes/25.1.40#presentation){:target="_blank"}
59+
* [EJ2 ASP.NET MVC Release Notes](https://ej2.syncfusion.com/aspnetmvc/documentation/release-notes/25.1.40#presentation){:target="_blank"}
60+
* [Blazor Release Notes](https://blazor.syncfusion.com/documentation/release-notes/25.1.40#presentation){:target="_blank"}
61+
* [EJ2 Angular Release Notes](https://ej2.syncfusion.com/angular/documentation/release-notes/25.1.40#presentation){:target="_blank"}
62+
* [EJ2 React Release Notes](https://ej2.syncfusion.com/react/documentation/release-notes/25.1.40#presentation){:target="_blank"}
63+
* [EJ2 Vue Release Notes](https://ej2.syncfusion.com/vue/documentation/release-notes/25.1.40#presentation){:target="_blank"}
64+
* [EJ2 JavaScript Release Notes](https://ej2.syncfusion.com/javascript/documentation/release-notes/25.1.40#presentation){:target="_blank"}
65+
* [EJ2 TypeScript Release Notes](https://ej2.syncfusion.com/documentation/release-notes/25.1.40#presentation){:target="_blank"}
66+
* [.NET MAUI Release Notes](/maui/release-notes/v25.1.40#presentation){:target="_blank"}
67+
* [Xamarin.Forms Release Notes](/xamarin/release-notes/v25.1.40#presentation){:target="_blank"}
68+
* [Xamarin.Android Release Notes](/xamarin-android/release-notes/v25.1.40#presentation){:target="_blank"}
69+
* [Xamarin.iOS Release Notes](/xamarin-ios/release-notes/v25.1.40#presentation){:target="_blank"}
70+
* [Flutter Release Notes](/flutter/release-notes/v25.1.40#presentation){:target="_blank"}
71+
* [WinUI Release Notes](/winui/release-notes/v25.1.40#presentation){:target="_blank"}
72+
* [Windows Forms Release Notes](/windowsforms/release-notes/v25.1.40#presentation){:target="_blank"}
73+
* [WPF Release Notes](/wpf/release-notes/v25.1.40#presentation){:target="_blank"}
74+
* [UWP Release Notes](/uwp/release-notes/v25.1.40#presentation){:target="_blank"}
75+
76+
77+
78+
## XlsIO
79+
80+
* [EJ2 ASP.NET Core Release Notes](https://ej2.syncfusion.com/aspnetcore/documentation/release-notes/25.1.40#xlsio){:target="_blank"}
81+
* [EJ2 ASP.NET MVC Release Notes](https://ej2.syncfusion.com/aspnetmvc/documentation/release-notes/25.1.40#xlsio){:target="_blank"}
82+
* [EJ2 Angular Release Notes](https://ej2.syncfusion.com/angular/documentation/release-notes/25.1.40#xlsio){:target="_blank"}
83+
* [Blazor Release Notes](https://blazor.syncfusion.com/documentation/release-notes/25.1.40#xlsio){:target="_blank"}
84+
* [EJ2 React Release Notes](https://ej2.syncfusion.com/react/documentation/release-notes/25.1.40#xlsio){:target="_blank"}
85+
* [EJ2 Vue Release Notes](https://ej2.syncfusion.com/vue/documentation/release-notes/25.1.40#xlsio){:target="_blank"}
86+
* [EJ2 JavaScript Release Notes](https://ej2.syncfusion.com/javascript/documentation/release-notes/25.1.40#xlsio){:target="_blank"}
87+
* [EJ2 TypeScript Release Notes](https://ej2.syncfusion.com/documentation/release-notes/25.1.40#xlsio){:target="_blank"}
88+
* [.NET MAUI Release Notes](/maui/release-notes/v25.1.40#xlsio){:target="_blank"}
89+
* [Xamarin.Forms Release Notes](/xamarin/release-notes/v25.1.40#xlsio){:target="_blank"}
90+
* [Xamarin.Android Release Notes](/xamarin-android/release-notes/v25.1.40#xlsio){:target="_blank"}
91+
* [Xamarin.iOS Release Notes](/xamarin-ios/release-notes/v25.1.40#xlsio){:target="_blank"}
92+
* [Flutter Release Notes](/flutter/release-notes/v25.1.40#xlsio){:target="_blank"}
93+
* [WinUI Release Notes](/winui/release-notes/v25.1.40#xlsio){:target="_blank"}
94+
* [UWP Release Notes](/uwp/release-notes/v25.1.40#xlsio){:target="_blank"}
95+
* [Windows Forms Release Notes](/windowsforms/release-notes/v25.1.40#xlsio){:target="_blank"}
96+
* [WPF Release Notes](/wpf/release-notes/v25.1.40#xlsio){:target="_blank"}
97+
98+

File-Formats/XlsIO/FAQ.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,5 @@ The frequently asked questions in Essential XlsIO are listed below.
8282
* [How to find and replace text in hyperlinks?](faqs/how-to-find-and-replace-text-in-hyperlinks)
8383
* [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)
8484
* [How to set Logarithmic axis for chart in Excel document?](faqs/how-to-set-logarithmic-axis-for-chart-in-excel-document)
85-
* [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)
85+
* [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)
86+
* [How to hide columns using column name](faqs/how-to-hide-columns-using-column-name)
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
---
2+
title: How to hide columns using column name |Syncfusion.
3+
description: This page explains how to hide columns using column name using Syncfusion .NET Excel library (XlsIO).
4+
platform: file-formats
5+
control: XlsIO
6+
documentation: UG
7+
---
8+
9+
# How to hide columns using column name?
10+
11+
The following code illustrates how to hide columns using column name.
12+
13+
{% tabs %}
14+
{% highlight c# tabtitle="C# [Cross-platform]" %}
15+
using (ExcelEngine excelEngine = new ExcelEngine())
16+
{
17+
IApplication application = excelEngine.Excel;
18+
application.DefaultVersion = ExcelVersion.Xlsx;
19+
20+
//Loads an existing file
21+
FileStream inputStream = new FileStream("InputTemplate.xlsx", FileMode.Open, FileAccess.Read);
22+
IWorkbook workbook = application.Workbooks.Open(inputStream);
23+
IWorksheet worksheet = workbook.Worksheets[0];
24+
25+
List<string> columnsToHide = new List<string> { "column1", "column2", "column3" };
26+
27+
foreach (string columnName in columnsToHide)
28+
{
29+
IRange headerCell = worksheet.UsedRange.FindFirst(columnName, ExcelFindType.Text);
30+
if (headerCell != null)
31+
{
32+
int columnIndex = headerCell.Column;
33+
34+
// Hide the column
35+
worksheet.ShowColumn(columnIndex, false);
36+
}
37+
}
38+
39+
//Saving the workbook as stream
40+
FileStream stream = new FileStream("Output.xlsx", FileMode.Create, FileAccess.ReadWrite);
41+
workbook.SaveAs(stream);
42+
stream.Dispose();
43+
}
44+
{% endhighlight %}
45+
46+
{% highlight c# tabtitle="C# [Windows-specific]" %}
47+
using (ExcelEngine excelEngine = new ExcelEngine())
48+
{
49+
IApplication application = excelEngine.Excel;
50+
application.DefaultVersion = ExcelVersion.Xlsx;
51+
52+
//Loads an existing file
53+
IWorkbook workbook = application.Workbooks.Open("InputTemplate.xlsx");
54+
IWorksheet worksheet = workbook.Worksheets[0];
55+
56+
List<string> columnsToHide = new List<string> { "column1", "column2", "column3" };
57+
58+
foreach (string columnName in columnsToHide)
59+
{
60+
IRange headerCell = worksheet.UsedRange.FindFirst(columnName, ExcelFindType.Text);
61+
if (headerCell != null)
62+
{
63+
int columnIndex = headerCell.Column;
64+
65+
// Hide the column
66+
worksheet.ShowColumn(columnIndex, false);
67+
}
68+
}
69+
70+
//Saving the workbook
71+
workbook.SaveAs("Output.xlsx");
72+
}
73+
{% endhighlight %}
74+
75+
{% highlight vb.net tabtitle="VB.NET [Windows-specific]" %}
76+
Using excelEngine As ExcelEngine = New ExcelEngine()
77+
Dim application As IApplication = excelEngine.Excel
78+
application.DefaultVersion = ExcelVersion.Xlsx
79+
80+
' Loads an existing file
81+
Dim workbook As IWorkbook = application.Workbooks.Open("InputTemplate.xlsx")
82+
Dim worksheet As IWorksheet = workbook.Worksheets(0)
83+
84+
Dim columnsToHide As List(Of String) = New List(Of String) From {"column1", "column2", "column3"}
85+
86+
For Each columnName As String In columnsToHide
87+
Dim headerCell As IRange = worksheet.UsedRange.FindFirst(columnName, ExcelFindType.Text)
88+
If headerCell IsNot Nothing Then
89+
Dim columnIndex As Integer = headerCell.Column
90+
91+
' Hide the column
92+
worksheet.ShowColumn(columnIndex, False)
93+
End If
94+
Next
95+
96+
' Saving the workbook
97+
workbook.SaveAs("Output.xlsx")
98+
End Using
99+
{% endhighlight %}
100+
{% endtabs %}

File-Formats/XlsIO/faqs/how-to-resolve-performance-issue-when-deleting-a-large-number-of-rows.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ using(ExcelEngine excelEngine = new ExcelEngine())
8181
//Remove the worksheet
8282
workbook.Worksheets[0].Remove();
8383

84-
//Saving the workbook as stream
84+
//Saving the workbook
8585
workbook.SaveAs("Output.xlsx");
8686
}
8787
{% endhighlight %}

0 commit comments

Comments
 (0)