Created
August 16, 2020 05:49
-
-
Save ritacse/2322d74b4e5cadd994f5cff140354baa to your computer and use it in GitHub Desktop.
This file contains hidden or 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
//// Create directory on specific folder | |
string folderPath = "C:\\Excel\\"; | |
if (!Directory.Exists(folderPath)) | |
{ | |
Directory.CreateDirectory(folderPath); | |
} | |
//// Get path of user "Documents" Folder | |
string user = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); | |
//// Concate folder with existing directory | |
string folderPath = Path.Combine(user, "Excel\\"); | |
if (!Directory.Exists(folderPath)) | |
{ | |
Directory.CreateDirectory(folderPath); | |
} | |
//// Get directory of project using specific file name | |
string fileName = "Shipment Date wise CST Summary.xlsx"; | |
var directory = Path.GetFullPath(fileName); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment