Skip to content

Copy Cell Value

Pierlam-dev edited this page Mar 15, 2026 · 2 revisions

Copy Cell Value to another Excel file

You can copy a cell a source Excel file to another file. The format of the value will be copied too: date, currency, ...

string filename ="data.xlsx";
ExcelFile excelFile = proc.OpenExcelFile(filename);
ExcelSheet excelSheet = proc.GetSheetAt(excelFile, 0);

string filenameDest = "dataDest.xlsx";
ExcelFile excelFileDest = proc.OpenExcelFile(filenameDest);
ExcelSheet excelSheetDest = proc.GetSheetAt(excelFileDest, 0);

ExcelCell cell;
ExcelCellValue excelCellValue;

// copy the cell value
res = proc.CopyCellValue(excelSheet, "A2", excelSheetDest, "B2");

Clone this wiki locally