diff --git a/Getting Started/Console/.NET/Create Excel/Create Excel/Create Excel.csproj b/Getting Started/Console/.NET/Create Excel/Create Excel/Create Excel.csproj index a8a25760..361a262a 100644 --- a/Getting Started/Console/.NET/Create Excel/Create Excel/Create Excel.csproj +++ b/Getting Started/Console/.NET/Create Excel/Create Excel/Create Excel.csproj @@ -16,6 +16,9 @@ Always + + Always + diff --git a/Getting Started/Console/.NET/Create Excel/Create Excel/Program.cs b/Getting Started/Console/.NET/Create Excel/Create Excel/Program.cs index d0f22eca..b1806cf3 100644 --- a/Getting Started/Console/.NET/Create Excel/Create Excel/Program.cs +++ b/Getting Started/Console/.NET/Create Excel/Create Excel/Program.cs @@ -19,7 +19,7 @@ static void Main(string[] args) IWorksheet worksheet = workbook.Worksheets[0]; //Adding a picture - FileStream imageStream = new FileStream("../../../Data/AdventureCycles-Logo.png", FileMode.Open, FileAccess.Read); + FileStream imageStream = new FileStream(Path.GetFullPath(@"Data/AdventureCycles-Logo.png"), FileMode.Open, FileAccess.Read); IPictureShape shape = worksheet.Pictures.AddPicture(1, 1, imageStream, 20, 20); //Disable gridlines in the worksheet @@ -180,7 +180,7 @@ static void Main(string[] args) worksheet.Range["A15:A23"].RowHeight = 18; //Saving the Excel to the Stream - using (FileStream stream = new FileStream("../../../Output/Output.xlsx", FileMode.Create, FileAccess.Write)) + using (FileStream stream = new FileStream(Path.GetFullPath(@"Output/Output.xlsx"), FileMode.Create, FileAccess.Write)) { workbook.SaveAs(stream); }