Hello,
Thanks for your feedback.
Sorry that we don't quite understand what you mean. I have tested the method with Spire.xls7.3, it works fine and it also set the PrintArea, please see the screenshot. The test file is in the attachment. Could you please provide us the following information if the issue persists?
1.Project can reproduce the issue
All code about this problem, a simple project which can reproduce this problem will be better.
2. Test Document or Test data
- Code: Select all
Workbook workbook = new Workbook();
workbook.LoadFromFile(@"..\..\EditSheetSample.xls");
Worksheet sheet = workbook.Worksheets[0];
string s = sheet.Range[1, 1, sheet.LastRow, sheet.LastColumn].RangeAddressLocal;
sheet.PageSetup.PrintArea = s;
workbook.SaveToFile(@"..\..\result.xls", ExcelVersion.Version97to2003);
System.Diagnostics.Process.Start(@"..\..\result.xls");
Sincerely,
Gary
E-iceblue support team