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 Aug 12, 2024 10:36 pm

Hi!, I have problems with the SaveToFile Method, the problem is a weird spacing between words with accent, I believe this problem is because the style applied in excel "Justify"

is there a way to fix this problem?

Sin título 2.png
Original
Sin título 2.png (53.04 KiB) Viewed 45 times


Sin título.png
PDF
Sin título.png (112.74 KiB) Viewed 45 times


Code: Select all

Workbook.LoadFromFile("C:\TEMP\CR\REPORTES\EdoCuenta.xlsx")

Workbook.SaveToFile(rutaTemp & nombrePDF, FileFormat.PDF)


I'm using FreeSpire.Xls 13.1.1.0 with Windows 10 64bit region México

My application type is console .NET Framework 4.7.2

the file i trying to fix
EdoCuenta.zip
FILE
(12.08 KiB) Downloaded 281 times

edgarnio
 
Posts: 2
Joined: Mon Aug 12, 2024 10:08 pm

Tue Aug 13, 2024 9:27 am

Hello,

Thanks for your inquiry.Using your attached xlsx document, I was able to reproduce the issue. This issue has been logged in our bug tracking system under the number SPIREXLS-5363. Our Dev team will investigate it further, once there is any update, we will let you know. If you have any other questions, please feel free to write to me.

Sincerely,
Amin
E-iceblue support team
User avatar

Amin.Gan
 
Posts: 283
Joined: Mon Jul 15, 2024 5:40 am

Wed Aug 14, 2024 12:30 am

Thanks!
in the meantime Is there a workaround or do I have to wait to the bug fix?

edgarnio
 
Posts: 2
Joined: Mon Aug 12, 2024 10:08 pm

Wed Aug 14, 2024 6:12 am

Hello,

Thanks for your inquiry.
Our Dev team are conducting the further investigation now, currently there is no better workaround available. I tested the following code,
Code: Select all
Worksheet sheet = workbook.Worksheets[0];
sheet.Range["A12"].Style.HorizontalAlignment = HorizontalAlignType.Left;

the word spacing can maintain normal, but the alignment effect on the right cannot be maintained. Anyway, once there is any feasible solutions, I will inform you immediately.

Sincerely,
Amin
E-iceblue support team
User avatar

Amin.Gan
 
Posts: 283
Joined: Mon Jul 15, 2024 5:40 am

Fri Sep 06, 2024 10:01 am

Hello,

Thank you for your patience.
Glad to inform that we just released Spire.XLS 14.9.1 hotfix which fixes the bug of SPIREXLS-5363, welcome to download it from the following link and test it.

Our website link: https://www.e-iceblue.com/Download/download-excel-for-net-now.html
NuGet link: https://www.nuget.org/packages/Spire.XLS/14.9.1

You can refer to the following code to set non accented character segmentation.If you have any other questions, please feel free to write to me.
Code: Select all
Workbook workbook = new Workbook();
workbook.LoadFromFile(inputFile);
workbook.CultureInfo = new CultureInfo("en-US");
workbook.SaveToFile(outputFile, FileFormat.PDF);
workbook.Dispose();

Sincerely,
Amin
E-iceblue support team
User avatar

Amin.Gan
 
Posts: 283
Joined: Mon Jul 15, 2024 5:40 am

Return to Spire.XLS