Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
Most of the time, the paper size of the worksheet is automatic. When it is automatic, it is often set as Letter. Sometimes the user sets the paper size of the worksheet according to their requirements. In this case, the paper size is not automatic. You can determine whether the worksheet’s paper size is automatic by using the Worksheet.PageSetup.IsAutomaticPaperSize property.
The sample code given below loads the following two Excel files
and determines whether the paper size of their first worksheet is automatic. In Microsoft Excel, you can check if the paper size is automatic via the Page Setup window as shown in this screenshot.

Here is the console output of the above sample code when executed with the given sample Excel files.
First Worksheet of First Workbook - IsAutomaticPaperSize: False
First Worksheet of Second Workbook - IsAutomaticPaperSize: True
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.