Skip to content

Commit caf0b8e

Browse files
Merge pull request #2330 from Syncfusion-Content/hotfix/hotfix-v32.2.3
DOCINFRA-2341_merged_using_automation
2 parents 1ba07d4 + 0b0cd96 commit caf0b8e

4 files changed

Lines changed: 143 additions & 0 deletions

Document-Processing-toc.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6470,6 +6470,15 @@
64706470
<li>
64716471
<a href="/document-processing/excel/excel-library/net/faqs/how-to-clear-formats-in-worksheet">How to clear formats in a worksheet using XlsIO?</a>
64726472
</li>
6473+
<li>
6474+
<a href="/document-processing/excel/excel-library/net/faqs/how-to-get-the-file-extension-of-excel-file">How to get the file extension of an Excel file using XlsIO?</a>
6475+
</li>
6476+
<li>
6477+
<a href="/document-processing/excel/excel-library/net/faqs/how-to-get-external-connection-name-and-change-table-name">How to get the external connection name from a QueryTable in an IListObject and how to change the table name using XlsIO?</a>
6478+
</li>
6479+
<li>
6480+
<a href="/document-processing/excel/excel-library/net/faqs/why-formulas-referencing-the-deleted-column-show-ref-errors">Why do formulas referencing a deleted column show #REF! errors?</a>
6481+
</li>
64736482
</ul>
64746483
</li>
64756484
</ul>
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
---
2+
title: How to get external connection name and rename the table | Syncfusion
3+
description: This page shows how to access a QueryTable's external connection name and how to change a table name using Syncfusion .NET Excel library (XlsIO).
4+
platform: document-processing
5+
control: XlsIO
6+
documentation: UG
7+
---
8+
9+
# How to access the external connection name and rename the table name?
10+
11+
The example below shows how to read the external connection name from a [QueryTable](https://help.syncfusion.com/cr/document-processing/Syncfusion.XlsIO.Implementation.QueryTableImpl.html#Syncfusion_XlsIO_Implementation_QueryTableImpl_ExternalConnection) on a [ListObject](https://help.syncfusion.com/cr/document-processing/Syncfusion.XlsIO.IListObjects.html) (table) and how to rename the table using Syncfusion XlsIO. Ensure the worksheet contains a ListObject with an associated QueryTable.
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+
IWorkbook workbook = application.Workbooks.Open("InputTemplate.xlsx");
20+
IWorksheet worksheet = workbook.Worksheets[0];
21+
IListObject table = worksheet.ListObjects[0];
22+
23+
// Get connection name
24+
string connectionName = table.QueryTable.ExternalConnection.Name;
25+
26+
// Change table name
27+
table.Name = "New table name";
28+
29+
// Saving the workbook
30+
workbook.SaveAs("Output.xlsx");
31+
}
32+
{% endhighlight %}
33+
34+
{% highlight c# tabtitle="C# [Windows-specific]" %}
35+
using (ExcelEngine excelEngine = new ExcelEngine())
36+
{
37+
IApplication application = excelEngine.Excel;
38+
application.DefaultVersion = ExcelVersion.Xlsx;
39+
IWorkbook workbook = application.Workbooks.Open("InputTemplate.xlsx");
40+
IWorksheet worksheet = workbook.Worksheets[0];
41+
IListObject table = worksheet.ListObjects[0];
42+
43+
// Get connection name
44+
string connectionName = table.QueryTable.ExternalConnection.Name;
45+
46+
// Change table name
47+
table.Name = "New table name";
48+
49+
// Saving the workbook
50+
workbook.SaveAs("Output.xlsx");
51+
}
52+
{% endhighlight %}
53+
54+
{% highlight vb.net tabtitle="VB.NET [Windows-specific]" %}
55+
Using excelEngine As New ExcelEngine()
56+
Dim application As IApplication = excelEngine.Excel
57+
application.DefaultVersion = ExcelVersion.Xlsx
58+
Dim workbook As IWorkbook = application.Workbooks.Open("InputTemplate.xlsx")
59+
Dim worksheet As IWorksheet = workbook.Worksheets(0)
60+
Dim table As IListObject = worksheet.ListObjects(0)
61+
62+
' Get connection name
63+
Dim connectionName As String = table.QueryTable.ExternalConnection.Name
64+
65+
' Change table name
66+
table.Name = "New table name"
67+
68+
' Saving the workbook
69+
workbook.SaveAs("Output.xlsx")
70+
End Using
71+
{% endhighlight %}
72+
{% endtabs %}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
title: How to get file extension of an Excel file | XlsIO | Syncfusion
3+
description: This page explains how to get the file extension of an Excel file using the Syncfusion .NET Excel library (XlsIO).
4+
platform: document-processing
5+
control: XlsIO
6+
documentation: UG
7+
---
8+
9+
# How to get the file extension of an Excel file using XlsIO?
10+
11+
When an Excel file is opened with XlsIO, you can obtain its full path and extension from the [WorkbookImpl.FullFileName](https://help.syncfusion.com/cr/document-processing/Syncfusion.XlsIO.Implementation.WorkbookImpl.html#Syncfusion_XlsIO_Implementation_WorkbookImpl_FullFileName) property. The following code snippet illustrates this.
12+
13+
{% tabs %}
14+
{% highlight c# tabtitle="C# [Cross-platform]" %}
15+
using (ExcelEngine excelEngine = new ExcelEngine())
16+
{
17+
IApplication application = excelEngine.Excel;
18+
IWorkbook workbook = application.Workbooks.Open("Sample.xlsx");
19+
20+
string fileName = (workbook as WorkbookImpl).FullFileName;
21+
22+
// Display file extension of excel file
23+
Console.WriteLine(Path.GetExtension(fileName));
24+
}
25+
{% endhighlight %}
26+
27+
{% highlight c# tabtitle="C# [Windows-specific]" %}
28+
using (ExcelEngine excelEngine = new ExcelEngine())
29+
{
30+
IApplication application = excelEngine.Excel;
31+
IWorkbook workbook = application.Workbooks.Open("Sample.xlsx");
32+
33+
string fileName = (workbook as WorkbookImpl).FullFileName;
34+
35+
// Display file extension of excel file
36+
Console.WriteLine(Path.GetExtension(fileName));
37+
}
38+
{% endhighlight %}
39+
40+
{% highlight vb.net tabtitle="VB.NET [Windows-specific]" %}
41+
Using excelEngine As New ExcelEngine()
42+
Dim application As IApplication = excelEngine.Excel
43+
Dim workbook As IWorkbook = application.Workbooks.Open("Sample.xlsx")
44+
45+
Dim fileName As String = CType(workbook, WorkbookImpl).FullFileName
46+
47+
' Display file extension of excel file
48+
Console.WriteLine(Path.GetExtension(fileName))
49+
End Using
50+
{% endhighlight %}
51+
{% endtabs %}
52+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
title: Formulas reference errors | Syncfusion
3+
description: This page explains why the formulas that referenced cells in the deleted column will display REF! errors.
4+
platform: document-processing
5+
control: XlsIO
6+
documentation: UG
7+
---
8+
9+
# Why do formulas referencing a deleted column show #REF! errors?
10+
When a column is deleted either directly in Excel or programmatically using Syncfusion XlsIO the entire column is removed and the columns to the right shift left. If any formula referenced cells within the deleted column, Excel can no longer resolve those references. As a result, the affected formulas display #REF! errors to indicate that the referenced cells no longer exist. Syncfusion XlsIO follows the same behavior as Microsoft Excel in this scenario.

0 commit comments

Comments
 (0)