I want to open all the existing files in the folder, read the data I want in each file, and then enter the details in a new csv file. So how should I perform this task?
Mostly excel files are present in the folder
Hi you can first get all the paths of the files in a direct in array of strings. Then after that use for each item to iterate through those paths and you can perform the operations on each file.
Try below expression to read all excel files in a folder.
strExcelFiles  = Directory.GetFiles("FolderPath","xlsx")
And then use ForEach loop to iterate one by one file.~
If you want to perform task on excel file only then
Using For Each item of directory.GetFiles(“d\abc”)
Use If ----- Item.contains(".xlsx") or Item.contains(".xls")
Excel Application Scope
thanks for your help.
thanks you very much. I understood what i have to do.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.