Spire.XLS is a professional Excel .NET library that can be used to any type of .NET( C#, VB.NET, ASP.NET, .NET Core) application and Java (J2SE and J2EE) application.

Wed Jul 31, 2019 2:46 pm

Hi,

Is it possible to set a custom paper size on a worksheet with Spire.XLS? If so, how do you do this?

Thanks!

newgui
 
Posts: 5
Joined: Wed Dec 09, 2015 11:03 pm

Thu Aug 01, 2019 8:40 am

Hi,

Thanks for your inquiry. This is Amber from E-iceblue support team.
Spire.Xls supports changing paper size on the worksheet. Here is the code for your reference.

Code: Select all
           
            //set the paper size you want
            sheet.PageSetup.PaperSize = Spire.Xls.PaperSizeType.PaperA3;


If I misunderstand, please offer us more detailed information. For example, the paper size you desired.

Best wishes,
Amber
E-iceblue support team
User avatar

Amber.Gu
 
Posts: 525
Joined: Tue Jun 04, 2019 3:16 am

Wed Aug 14, 2019 9:07 am

Hi,

Greetings from E-iceblue.
Have you tried the code I offered you last time? Does it solve your issue?
Could you please give us some feedback at your convenience?

Best wishes,
Amber
E-iceblue support team
User avatar

Amber.Gu
 
Posts: 525
Joined: Tue Jun 04, 2019 3:16 am

Sat Oct 23, 2021 10:50 am

How can i add a custom size type?

dark_prince69
 
Posts: 5
Joined: Sat Oct 23, 2021 10:29 am

Mon Oct 25, 2021 1:48 am

Dear Pedro,

Thanks for your query.
Do you want to add a custom size when converting Excel to PDF? If so, the feature has been logged in our product upgrade system with the ticket SPIREXLS-3487. When it is supported, I will inform you.

If I misunderstand your requirement, please provide the further details. Thanks.

Sincerely,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2645
Joined: Wed Jun 27, 2012 8:50 am

Thu Nov 25, 2021 9:31 am

Dear Pedro,

I'm glad to inform you that SPIREXLS-3487 has been supported. Please download Spire.XLS Pack(Hotfix) Version:11.11.2 and test this code, workbook.Worksheets[0].PageSetup.SetCustomPaperSize(width, height).

Sincerely,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2645
Joined: Wed Jun 27, 2012 8:50 am

Wed Dec 08, 2021 9:45 am

Dear Pedro,

Greetings from E-iceblue.
Has your issue been solved? Could you please give us some feedback?

Sincerely,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2645
Joined: Wed Jun 27, 2012 8:50 am

Return to Spire.XLS

cron