Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

Mon Sep 18, 2023 8:43 pm

Hello,

I am currently working on an web application using ASP.NET Core (.NET Framework 7.0.103) in Windows 10 and utilizing Spire.Xls 12.7.0.

I am trying to create a Table of Contents page as I am looping through my data and one particular part I need is the show the sheet number so that when the workbook is printed my team can see what page different topics are on. I had built a similar application in VBA where I could utilize the =SHEET([value]) formula and I tried doing that in my C# web application but the output is just a syntax error (#NAME?), though when I click in the formula bar and press enter, the formula works and I see the correct sheet number. Code below:

Spire.Xls.Workbook workbook = new();

Spire.Xls.Worksheet index = workbook.Worksheets.Add("Index");

// create sheets
for (int i = 1; i < data.Count; i++)
{
Spire.Xls.Worksheet blank1 = workbook.Worksheets.Add(data[i].RowID.ToString());

index.Range[i, 4].Formula = "=SHEET(" + (char)34 + data[i].RowID + "-1" + (char)34 + ")";
}

jacktorrealba
 
Posts: 6
Joined: Mon Sep 18, 2023 8:25 pm

Tue Sep 19, 2023 3:06 am

Hi,

After simplified your code: index.Range[i, 4].Formula = "=SHEET(" + A3 + ")";, we were able to reproduce the problem you described, the formulas in the generated Excel document require an additional carriage return in the formula bar to be displayed correctly.
result.png
result.png (19.83 KiB) Viewed 1701 times

Please rest assured that I have recorded this issue in our issue tracking system with the ticket number SPIREXLS-4904. Our development team will investigate and fix it. We apologize for any inconvenience caused, once the issue is fixed, we will inform you asap.

Best regards,
Triste
E-iceblue support team
User avatar

Triste.Dai
 
Posts: 1000
Joined: Tue Nov 15, 2022 3:59 am

Mon Nov 27, 2023 5:59 am

Hi,

Thanks for your patience.
We are delighted to inform you that we just released Spire.Xls 13.11.4 hotfix, which has fixed the issue SPIREXLS-4904, please download from the following link and have a test.
Website: https://www.e-iceblue.com/Download/download-excel-for-net-now.html
Nuget: https://www.nuget.org/packages/Spire.XLS/13.11.4

Best regards,
Triste
E-iceblue support team
User avatar

Triste.Dai
 
Posts: 1000
Joined: Tue Nov 15, 2022 3:59 am

Fri Dec 01, 2023 6:43 pm

Has this fix been applied to FreeSpire XLS as well?

jacktorrealba
 
Posts: 6
Joined: Mon Sep 18, 2023 8:25 pm

Mon Dec 04, 2023 2:27 am

Hi,

Thanks for your inquiry.
Regret to inform you that the fix has not been applied to the free version, the free version was released about one and a half year ago, we maintain it irregularly. Our commercial edition contains more hotfixes and new features, we recommend that you try it, we can offer a temporary license (one-month-free) for you to evaluate it better. If you need, just let me know or apply for it through this link(https://www.e-iceblue.com/TemLicense.html).

Best regards,
Triste
E-iceblue support team
User avatar

Triste.Dai
 
Posts: 1000
Joined: Tue Nov 15, 2022 3:59 am

Return to Spire.XLS

cron