Empty same cell from many excel spreadsheets
Go to solution
Solved by Franck,
You could write a small 10 lines in C# to do this, as long as you have microsoft office installed.
i'm not 100% sure of the syntax as i don't use the core office library to edit excel files but it must be something along these lines
foreach (var file in Directory.GetFiles("C:\\folder1\\folder2\\")) { // create excel app var excelApp = new Microsoft.Office.Interop.Excel.Application(); // open the file var workbook = excelApp.Workbooks.Open(file); // load a specific worksheet var worksheet = workbook.Sheets[1] as Microsoft.Office.Interop.Excel._Worksheet; // get the cells range var range = worksheet.UsedRange; // empty cell value row 3, column 6 range.Cells[3, 6].Value2 = ""; // close workbook and app workbook.Close(); excelApp.Quit(); }
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now