Skip to content

Instantly share code, notes, and snippets.

@aspose-com-kb
Last active June 27, 2024 16:09
Show Gist options
  • Save aspose-com-kb/86ebb6a7b04ad65da2eebcc2e48b05fd to your computer and use it in GitHub Desktop.
Save aspose-com-kb/86ebb6a7b04ad65da2eebcc2e48b05fd to your computer and use it in GitHub Desktop.
Freeze Panes in Excel using C#.
using Aspose.Cells;
class Program
{
static void Main(string[] args)
{
new License().SetLicense("License.lic");
// Instantiate a new Workbook.
Workbook workbook = new Workbook("Sample.xlsx");
// Freezing panes at th cell B1
workbook.Worksheets[0].FreezePanes("B1", 1, 1);
//workbook.Worksheets[0].UnFreezePanes();
// Saving the file
workbook.Save("frozen.xlsx");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment