Designing a program to read excel columns into an array

This project is a little of a doozy so I'll keep it as simple as possible: Basically, I want to create a program that replaces having to create robocopy batch files from an excel workbook of file paths with the purpose of rebuilding a file system.

A better way of explaining what I'm trying to do is with an example: say you get an archive from a client with a bunch of single files, as well as an excel worksheet of all of those files original file paths. The request is this: rebuild the file system hierarchy so that the single files appear in the appropriate folders that they would have appeared in on the original computer. Any sane person would just take the file paths and create a batch file out of that and the names of the files and robocopy away. I'm trying to make a program that can read that excel worksheet, import the values of the cells into a string array, read the names and current file paths of the files given into another string array, then perform a copy of those files into their appropriate locations on a new drive. (Two inputs and one output).

The current code I'm working with includes the code project Excel.dll reference, but I'm fairly new to coding as is and I'm suddenly realizing this isn't such an easy task. Let me know if anyone has experience with something like this and what further details are needed to get some help with this, thanks.

by Bholl92 via /r/csharp

Leave a Reply