عرض أو إخفاء أشرطة التمرير في Aspose.Cells

Aspose.Cells يوفر فصل دراسي ،دفتر العمليمثل ملف Excel. الدفتر العمل توفر class مجموعة كبيرة من الخصائص والأساليب لإدارة ملف Excel. للتحكم في رؤية أشرطة التمرير ، استخدم ملفإعدادات المصنف صف دراسي'IsVScrollBarVisible وIsHScrollBarVisible الخصائص.IsVScrollBarVisible وIsHScrollBarVisible هي خصائص منطقية ، مما يعني أن هذه الخصائص يمكن تخزينها فقطحقيقي أوخاطئة القيم.

يوجد أدناه رمز كامل يفتح ملف Excel ، book1.xls ، ويخفي شريطي التمرير ثم يحفظ الملف المعدل كـ output.xls.

توضح لقطة الشاشة أدناه ملف Book1.xls الذي يحتوي على شريطي التمرير. يتم حفظ الملف المعدل كملف output.xls ، كما هو موضح أدناه.

Book1.xls: ملف Excel قبل أي تعديل

ما يجب القيام به: image_بديل_نص

output.xls: ملف Excel بعد التعديل

ما يجب القيام به: image_بديل_نص

C#

 //Creating a file stream containing the Excel file to be opened

FileStream fstream = new FileStream("book1.xls", FileMode.Open);

//Instantiating a Workbook object

//Opening the Excel file through the file stream

Workbook workbook = new Workbook(fstream);

//Hiding the vertical scroll bar of the Excel file

workbook.Settings.IsVScrollBarVisible = false;

//Hiding the horizontal scroll bar of the Excel file

workbook.Settings.IsHScrollBarVisible = false;

//Saving the modified Excel file

workbook.Save("output.xls");

//Closing the file stream to free all resources

fstream.Close();

قم بتنزيل كود التشغيل

تنزيل نموذج التعليمات البرمجية