This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using FileFormat.Cells | |
public class FreezePaneExample | |
{ | |
public static void Main(string[] args) | |
{ | |
string filePath = "your-file-path.xlsx"; // Replace with your file path | |
using (Workbook wb = new Workbook(filePath)) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using FileFormat.Cells | |
string filePath = "Z:\\Downloads\\testFile1.xlsx"; | |
// Load the workbook from the specified file path | |
using (Workbook wb = new Workbook(filePath)) | |
{ | |
Worksheet firstSheet = wb.Worksheet[0]; | |
string columnHeading = firstSheet.GetColumnHeading("B"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using FileFormat.Cells | |
string filePath = "Z:\\Downloads\\testFile1.xlsx"; | |
string existingSheetName = "TestSheet"; | |
string newSheetName = "RenameSheetName"; | |
// Load the workbook from the specified file path | |
using (Workbook wb = new Workbook(filePath)) | |
{ | |
wb.RenameSheet(existingSheetName, newSheetName); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using FileFormat.Cells | |
string filePath = "Z:\\Downloads\\testFile1.xlsx"; | |
string sheetName = "TestSheet"; | |
// Load the workbook from the specified file path | |
using (Workbook wb = new Workbook(filePath)) | |
{ | |
wb.SetSheetVisibility(sheetName, SheetVisibility.Hidden); | |
wb.Save(filePath); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Define the directory where files are stored | |
string outputDirectory = "Z:\\Downloads\\"; | |
// Specify the path to the Excel file | |
string filePath = "Z:\\Downloads\\testFile1.xlsx"; | |
// Open the workbook located at the specified file path | |
using (Workbook wb = new Workbook(filePath)) | |
{ | |
// Access the first worksheet in the workbook |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using FileFormat.Cells | |
string filePath = "Z:\\Downloads\\testFile1.xlsx"; | |
// Load the workbook from the specified file path | |
using (Workbook wb = new Workbook(filePath)) | |
{ | |
// Access the first worksheet in the workbook | |
Worksheet firstSheet = wb.Worksheets[0]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using FileFormat.Cells; | |
using (Workbook wb = new Workbook(filePath)) | |
{ | |
string startColumn = "B"; | |
int numberOfColumns = 3; | |
Worksheet firstSheet = wb.Worksheets[0]; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using FileFormat.Cells; | |
// Load the workbook from the specified file path | |
using (Workbook wb = new Workbook(filePath)) | |
{ | |
// Access the first worksheet in the workbook | |
Worksheet firstSheet = wb.Worksheets[0]; | |
// Define the starting row index and the number of rows to insert | |
uint startRowIndex = 5; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using FileFormat.Cells; | |
// Load the workbook from the specified file path | |
using (Workbook wb = new Workbook(filePath)) | |
{ | |
// Access the first worksheet in the workbook | |
Worksheet firstSheet = wb.Worksheets[0]; | |
// Select a range within the worksheet | |
var range = firstSheet.GetRange("A1", "B10"); | |
Console.WriteLine($"Column count: {range.ColumnCount}"); |
NewerOlder