Page Layout / Size

Questions and answers on how to use XLSReadWriteII 5.
Post Reply
CareAll
Posts: 28
Joined: Mon Jun 24, 2013 9:30 am

Page Layout / Size

Post by CareAll »

Hello,

In my source xlsx file on the 'Page Layout' tab the 'Size' property is set to A3, but after saving the output file it is changed to A4.
Please investigate this issue.
Thank you

Tamas
CareAll
Posts: 28
Joined: Mon Jun 24, 2013 9:30 am

Re: Page Layout / Size

Post by CareAll »

As far as I can see, XLS.Sheets.Xc12Sheet.PageSetup.PaperSize always returns psA4.
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: Page Layout / Size

Post by larsa »

Hello

Use: XLS[0].PrintSettings.PaperSize := psLegal;
Lars Arvidsson, Axolot Data
CareAll
Posts: 28
Joined: Mon Jun 24, 2013 9:30 am

Re: Page Layout / Size

Post by CareAll »

Hello Lars,

The problem is the XLS.Sheets[0].Xc12Sheet.PageSetup.PaperSize doesn't contain the right value after reading the file.
It should be the value from the \xl\worksheets\sheet1.xml:

Code: Select all

<pageSetup paperSize="8" orientation="portrait" r:id="rId452"/>
As you can see, paperSize is 8 (psA3) in this example, but when I open the file, the XLS.Sheets[0].Xc12Sheet.PageSetup.PaperSize has the value of 9 (psA4).
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: Page Layout / Size

Post by larsa »

Hello

OK, I understand now. This will be fixed in the next update.
Lars Arvidsson, Axolot Data
CareAll
Posts: 28
Joined: Mon Jun 24, 2013 9:30 am

Re: Page Layout / Size

Post by CareAll »

Thanks in advance.
Post Reply