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.

Wed Jul 28, 2021 6:52 am

Hello, I ran into the problem of auto-fitting lines in Excel, I use the following code:

Code: Select all
workbook.ActiveSheet.AllocatedRange.AutoFitRows();


does not help, can you please tell me what is better to use in this case? thanks.

s.shevyakov
 
Posts: 18
Joined: Thu Jul 15, 2021 8:42 am

Wed Jul 28, 2021 10:27 am

Hi,

Thanks for your inquiry.
I did an initial test and found this code your used worked well on my side. The version I used is the latest version(Spire.XLS Pack(Hotfix) Version:11.7.0). If you were not using the latest version, please first give it a try. If the issue still exists after trying, please provide your Excel file and the complete test code to help us do further investigation.You could attach them here or send to us via email (support@e-iceblue.com). Thanks in advance.

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1643
Joined: Wed Apr 07, 2021 2:50 am

Wed Jul 28, 2021 12:00 pm

Sorry, forgot to mention that I'm using Spire.Office 6.7.0

s.shevyakov
 
Posts: 18
Joined: Thu Jul 15, 2021 8:42 am

Thu Jul 29, 2021 7:48 am

Hello,

Thank you for your sharing.
I tested my simulation file with Spire.Office 6.7.0 and found that the code still works well. To help us investigate this issue quickly and effectively, please provide the following information. You could attach them here or send to us via email (support@e-iceblue.com). Thanks in advance.
1) Your Excel file.
2) Your full testing code.
3) Your test environment, such as OS info (E.g. Windows 7, 64-bit) and region setting (E.g. China, Chinese).
4) Your application type, such as Console app (. Net Framework 4.5).

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1643
Joined: Wed Apr 07, 2021 2:50 am

Return to Spire.XLS

cron