Yes, you can freeze panes using Cells.FreezePanes() method.
May the following sample code help you for your need:
OleDbConnection con = new OleDbConnection("provider=microsoft.jet.oledb.4.0;data source=d:\\test\\Northwind.mdb"); con.Open(); OleDbCommand cmd = new OleDbCommand("Select * from Employees",con); OleDbDataAdapter da = new OleDbDataAdapter(); da.SelectCommand = cmd; DataSet ds = new DataSet(); da.Fill(ds,"Employees"); Workbook wb = new Workbook(); Worksheet ws = wb.Worksheets[0]; // Import the datatable ws.Cells.ImportDataTable(ds.Tables["Employees"], true, "A1"); //Freeze the first two columns i.e, A and B. ws.FreezePanes(0, 2,0, 2); wb.Save("d:\\test\\frozencols.xls",Aspose.Cells.FileFormatType.Excel2003);
For further ref, please check the wiki doc:
Thank you.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
Enables storage, such as cookies, related to analytics.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.