I’m using C# to generate new files from Excel’s Template.xlsm workbook. Some sheets of this workbook have pagesetup settings. And after saving this file with different name,
var pathToSave = Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "\\New file#" + fileName;
_eWorkbook.SaveAs(pathToSave, XlFileFormat.xlOpenXMLWorkbookMacroEnabled);
where fileName is just a number, page setup settings are change. I’m not changing it in my code, I work with ranges and values.
Excel saves the entire printer settings even the private printer settings in it. Now once you open a workbook in MSExcel, which was last time saved with printer1 but now the printer is printer2, then the new workbook would contain settings of printer2. Which would also recompute the page layout because the column width is dependent upon printer settings in Excel.
Also you should be able to reproduce the issue from Excel UI as well not only from API.