From 6d4f74e724c7331be6574935d86e7dcf5e3a3641 Mon Sep 17 00:00:00 2001 From: MOHAN CHANDRAN <93247949+Mohan2401@users.noreply.github.com> Date: Mon, 26 Aug 2024 11:33:54 +0530 Subject: [PATCH] Playground changes --- .../Range to JSON with Schema/Program.cs | 2 +- .../Range to JSON without Schema/Program.cs | 2 +- .../Workbook to JSON with Schema/Program.cs | 2 +- .../Worksheet to JSON without Schema/Program.cs | 2 +- Create and Edit Charts/Axis/.NET/Axis/Axis/Program.cs | 2 +- .../Chart Area/.NET/Chart Area/Chart Area/Program.cs | 2 +- .../Chart Title/.NET/Chart Title/Chart Title/Program.cs | 2 +- .../Data Labels/.NET/Data Labels/Data Labels/Program.cs | 2 +- Create and Edit Charts/Legend/.NET/Legend/Legend/Program.cs | 2 +- .../Plot Area/.NET/Plot Area/Plot Area/Program.cs | 2 +- .../.NET/Table To Range/Table To Range/Program.cs | 2 +- .../Excel to CSV/.NET/Excel to CSV/Excel to CSV/Program.cs | 2 +- .../Excel to TSV/.NET/Excel to TSV/Excel to TSV/Program.cs | 2 +- .../TSV to Excel/.NET/TSV to Excel/TSV to Excel/Program.cs | 2 +- .../.NET/UnFreeze Panes/UnFreeze Panes/Program.cs | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Convert Excel to JSON/Range to JSON with Schema/.NET/Range to JSON with Schema/Range to JSON with Schema/Program.cs b/Convert Excel to JSON/Range to JSON with Schema/.NET/Range to JSON with Schema/Range to JSON with Schema/Program.cs index f17c7c49..7571eb2f 100644 --- a/Convert Excel to JSON/Range to JSON with Schema/.NET/Range to JSON with Schema/Range to JSON with Schema/Program.cs +++ b/Convert Excel to JSON/Range to JSON with Schema/.NET/Range to JSON with Schema/Range to JSON with Schema/Program.cs @@ -21,7 +21,7 @@ static void Main(string[] args) #region save as JSON //Saves the workbook to a JSON filestream, as schema by default - FileStream outputStream = new FileStream("Excel-Range-To-JSON-as-schema-default.json", FileMode.Create, FileAccess.ReadWrite); + FileStream outputStream = new FileStream(Path.GetFullPath("Output/Excel-Range-To-JSON-as-schema-default.json"), FileMode.Create, FileAccess.ReadWrite); workbook.SaveAsJson(outputStream, range); //Saves the workbook to a JSON filestream as schema diff --git a/Convert Excel to JSON/Range to JSON without Schema/.NET/Range to JSON without Schema/Range to JSON without Schema/Program.cs b/Convert Excel to JSON/Range to JSON without Schema/.NET/Range to JSON without Schema/Range to JSON without Schema/Program.cs index 0aad1974..484e3c04 100644 --- a/Convert Excel to JSON/Range to JSON without Schema/.NET/Range to JSON without Schema/Range to JSON without Schema/Program.cs +++ b/Convert Excel to JSON/Range to JSON without Schema/.NET/Range to JSON without Schema/Range to JSON without Schema/Program.cs @@ -21,7 +21,7 @@ static void Main(string[] args) #region save as JSON //Saves the workbook to a JSON filestream, as schema by default - FileStream outputStream = new FileStream("Excel-Range-To-JSON-filestream-without-schema.json", FileMode.Create, FileAccess.ReadWrite); + FileStream outputStream = new FileStream(Path.GetFullPath("Output/Excel-Range-To-JSON-filestream-without-schema.json"), FileMode.Create, FileAccess.ReadWrite); workbook.SaveAsJson(outputStream, range, false); #endregion diff --git a/Convert Excel to JSON/Workbook to JSON with Schema/.NET/Workbook to JSON with Schema/Workbook to JSON with Schema/Program.cs b/Convert Excel to JSON/Workbook to JSON with Schema/.NET/Workbook to JSON with Schema/Workbook to JSON with Schema/Program.cs index 6551de3a..6bd634fd 100644 --- a/Convert Excel to JSON/Workbook to JSON with Schema/.NET/Workbook to JSON with Schema/Workbook to JSON with Schema/Program.cs +++ b/Convert Excel to JSON/Workbook to JSON with Schema/.NET/Workbook to JSON with Schema/Workbook to JSON with Schema/Program.cs @@ -18,7 +18,7 @@ static void Main(string[] args) #region save as JSON //Saves the workbook to a JSON filestream, as schema by default - FileStream outputStream = new FileStream("Excel-Workbook-To-JSON-as-schema-default.json", FileMode.Create, FileAccess.ReadWrite); + FileStream outputStream = new FileStream(Path.GetFullPath("Output/Excel-Workbook-To-JSON-as-schema-default.json"), FileMode.Create, FileAccess.ReadWrite); workbook.SaveAsJson(outputStream); //Saves the workbook to a JSON filestream as schema diff --git a/Convert Excel to JSON/Worksheet to JSON without Schema/.NET/Worksheet to JSON without Schema/Worksheet to JSON without Schema/Program.cs b/Convert Excel to JSON/Worksheet to JSON without Schema/.NET/Worksheet to JSON without Schema/Worksheet to JSON without Schema/Program.cs index b47d12e0..4a031edc 100644 --- a/Convert Excel to JSON/Worksheet to JSON without Schema/.NET/Worksheet to JSON without Schema/Worksheet to JSON without Schema/Program.cs +++ b/Convert Excel to JSON/Worksheet to JSON without Schema/.NET/Worksheet to JSON without Schema/Worksheet to JSON without Schema/Program.cs @@ -18,7 +18,7 @@ static void Main(string[] args) #region save as JSON //Saves the workbook to a JSON filestream, as schema by default - FileStream outputStream = new FileStream("Excel-Worksheet-To-JSON-filestream-without-schema.json", FileMode.Create, FileAccess.ReadWrite); + FileStream outputStream = new FileStream(Path.GetFullPath("Output/Excel-Worksheet-To-JSON-filestream-without-schema.json"), FileMode.Create, FileAccess.ReadWrite); workbook.SaveAsJson(outputStream, worksheet,false); #endregion diff --git a/Create and Edit Charts/Axis/.NET/Axis/Axis/Program.cs b/Create and Edit Charts/Axis/.NET/Axis/Axis/Program.cs index da28a16d..5bffedb7 100644 --- a/Create and Edit Charts/Axis/.NET/Axis/Axis/Program.cs +++ b/Create and Edit Charts/Axis/.NET/Axis/Axis/Program.cs @@ -83,7 +83,7 @@ public static void Main(string[] args) chart.PrimaryValueAxis.HasMinorGridLines = false; //Saving the workbook as stream - FileStream outputStream = new FileStream("Output.xlsx", FileMode.Create, FileAccess.ReadWrite); + FileStream outputStream = new FileStream(Path.GetFullPath("Output/Output.xlsx"), FileMode.Create, FileAccess.ReadWrite); workbook.SaveAs(outputStream); //Dispose streams diff --git a/Create and Edit Charts/Chart Area/.NET/Chart Area/Chart Area/Program.cs b/Create and Edit Charts/Chart Area/.NET/Chart Area/Chart Area/Program.cs index be7e7953..7189d63f 100644 --- a/Create and Edit Charts/Chart Area/.NET/Chart Area/Chart Area/Program.cs +++ b/Create and Edit Charts/Chart Area/.NET/Chart Area/Chart Area/Program.cs @@ -31,7 +31,7 @@ public static void Main(string[] args) chartArea.Fill.ForeColor = Color.White; //Saving the workbook as stream - FileStream outputStream = new FileStream("Output.xlsx", FileMode.Create, FileAccess.ReadWrite); + FileStream outputStream = new FileStream(Path.GetFullPath("Output/Output.xlsx"), FileMode.Create, FileAccess.ReadWrite); workbook.SaveAs(outputStream); //Dispose streams diff --git a/Create and Edit Charts/Chart Title/.NET/Chart Title/Chart Title/Program.cs b/Create and Edit Charts/Chart Title/.NET/Chart Title/Chart Title/Program.cs index 92868b32..628758f2 100644 --- a/Create and Edit Charts/Chart Title/.NET/Chart Title/Chart Title/Program.cs +++ b/Create and Edit Charts/Chart Title/.NET/Chart Title/Chart Title/Program.cs @@ -30,7 +30,7 @@ public static void Main(string[] args) chart.ChartTitleArea.Layout.Left = 20; //Saving the workbook as stream - FileStream outputStream = new FileStream("Output.xlsx", FileMode.Create, FileAccess.ReadWrite); + FileStream outputStream = new FileStream(Path.GetFullPath("Output/Output.xlsx"), FileMode.Create, FileAccess.ReadWrite); workbook.SaveAs(outputStream); outputStream.Dispose(); inputStream.Dispose(); diff --git a/Create and Edit Charts/Data Labels/.NET/Data Labels/Data Labels/Program.cs b/Create and Edit Charts/Data Labels/.NET/Data Labels/Data Labels/Program.cs index 3da65270..1dca4925 100644 --- a/Create and Edit Charts/Data Labels/.NET/Data Labels/Data Labels/Program.cs +++ b/Create and Edit Charts/Data Labels/.NET/Data Labels/Data Labels/Program.cs @@ -46,7 +46,7 @@ public static void Main(string[] args) (dataLabel as ChartDataLabelsImpl).NumberFormat = "#,##0.00"; //Saving the workbook as stream - FileStream outputStream = new FileStream("Output.xlsx", FileMode.Create, FileAccess.ReadWrite); + FileStream outputStream = new FileStream(Path.GetFullPath("Output/Output.xlsx"), FileMode.Create, FileAccess.ReadWrite); workbook.SaveAs(outputStream); //Dispose streams diff --git a/Create and Edit Charts/Legend/.NET/Legend/Legend/Program.cs b/Create and Edit Charts/Legend/.NET/Legend/Legend/Program.cs index 6e5e6fb9..3bc011a1 100644 --- a/Create and Edit Charts/Legend/.NET/Legend/Legend/Program.cs +++ b/Create and Edit Charts/Legend/.NET/Legend/Legend/Program.cs @@ -48,7 +48,7 @@ public static void Main(string[] args) chart.Legend.IncludeInLayout = true; //Saving the workbook as stream - FileStream outputStream = new FileStream("Output.xlsx", FileMode.Create, FileAccess.ReadWrite); + FileStream outputStream = new FileStream(Path.GetFullPath("Output/Output.xlsx"), FileMode.Create, FileAccess.ReadWrite); workbook.SaveAs(outputStream); outputStream.Dispose(); inputStream.Dispose(); diff --git a/Create and Edit Charts/Plot Area/.NET/Plot Area/Plot Area/Program.cs b/Create and Edit Charts/Plot Area/.NET/Plot Area/Plot Area/Program.cs index f40bbfa0..3661d4cb 100644 --- a/Create and Edit Charts/Plot Area/.NET/Plot Area/Plot Area/Program.cs +++ b/Create and Edit Charts/Plot Area/.NET/Plot Area/Plot Area/Program.cs @@ -34,7 +34,7 @@ public static void Main(string[] args) chartPlotArea.Layout.Left = 5; //Saving the workbook as stream - FileStream outputStream = new FileStream("Output.xlsx", FileMode.Create, FileAccess.ReadWrite); + FileStream outputStream = new FileStream(Path.GetFullPath("Output/Output.xlsx"), FileMode.Create, FileAccess.ReadWrite); workbook.SaveAs(outputStream); //Dispose streams diff --git a/Create and Edit Table/Table To Range/.NET/Table To Range/Table To Range/Program.cs b/Create and Edit Table/Table To Range/.NET/Table To Range/Table To Range/Program.cs index 41e2e314..95b72215 100644 --- a/Create and Edit Table/Table To Range/.NET/Table To Range/Table To Range/Program.cs +++ b/Create and Edit Table/Table To Range/.NET/Table To Range/Table To Range/Program.cs @@ -48,7 +48,7 @@ static void Main(string[] args) worksheet.UsedRange.BorderNone(); //Saving the workbook as stream - FileStream outputStream = new FileStream("Output.xlsx", FileMode.Create, FileAccess.ReadWrite); + FileStream outputStream = new FileStream(Path.GetFullPath("Output/Output.xlsx"), FileMode.Create, FileAccess.ReadWrite); workbook.SaveAs(outputStream); } } diff --git a/Excel to CSV/Excel to CSV/.NET/Excel to CSV/Excel to CSV/Program.cs b/Excel to CSV/Excel to CSV/.NET/Excel to CSV/Excel to CSV/Program.cs index 491b98cd..6caab63d 100644 --- a/Excel to CSV/Excel to CSV/.NET/Excel to CSV/Excel to CSV/Program.cs +++ b/Excel to CSV/Excel to CSV/.NET/Excel to CSV/Excel to CSV/Program.cs @@ -14,7 +14,7 @@ public static void Main(string[] args) IWorkbook workbook = application.Workbooks.Open(inputStream); //Saving the workbook as streams - FileStream outputStream = new FileStream("Sample.csv", FileMode.Create, FileAccess.ReadWrite); + FileStream outputStream = new FileStream(Path.GetFullPath("Output/Sample.csv"), FileMode.Create, FileAccess.ReadWrite); workbook.SaveAs(outputStream, ","); //Dispose streams diff --git a/Excel to TSV/Excel to TSV/.NET/Excel to TSV/Excel to TSV/Program.cs b/Excel to TSV/Excel to TSV/.NET/Excel to TSV/Excel to TSV/Program.cs index 9412e786..c63ae5a1 100644 --- a/Excel to TSV/Excel to TSV/.NET/Excel to TSV/Excel to TSV/Program.cs +++ b/Excel to TSV/Excel to TSV/.NET/Excel to TSV/Excel to TSV/Program.cs @@ -15,7 +15,7 @@ public static void Main(string[] args) IWorkbook workbook = application.Workbooks.Open(inputStream); //Save the workbook in CSV format with tab(\t) as delimiter - FileStream outputStream = new FileStream("Output.tsv", FileMode.Create, FileAccess.ReadWrite); + FileStream outputStream = new FileStream(Path.GetFullPath("Output/Output.tsv"), FileMode.Create, FileAccess.ReadWrite); workbook.SaveAs(outputStream, "\t"); } } diff --git a/TSV to Excel/TSV to Excel/.NET/TSV to Excel/TSV to Excel/Program.cs b/TSV to Excel/TSV to Excel/.NET/TSV to Excel/TSV to Excel/Program.cs index 7ff45fe4..f0cc19a2 100644 --- a/TSV to Excel/TSV to Excel/.NET/TSV to Excel/TSV to Excel/Program.cs +++ b/TSV to Excel/TSV to Excel/.NET/TSV to Excel/TSV to Excel/Program.cs @@ -16,7 +16,7 @@ public static void Main(string[] args) IWorkbook workbook = application.Workbooks.Open(inputStream, "\t"); //Save the workbook - FileStream outputStream = new FileStream("Output.xlsx", FileMode.Create, FileAccess.ReadWrite); + FileStream outputStream = new FileStream(Path.GetFullPath("Output/Output.xlsx"), FileMode.Create, FileAccess.ReadWrite); workbook.SaveAs(outputStream); //Dispose streams diff --git a/Worksheet Features/UnFreeze Panes/.NET/UnFreeze Panes/UnFreeze Panes/Program.cs b/Worksheet Features/UnFreeze Panes/.NET/UnFreeze Panes/UnFreeze Panes/Program.cs index 9ec126ae..d06223e5 100644 --- a/Worksheet Features/UnFreeze Panes/.NET/UnFreeze Panes/UnFreeze Panes/Program.cs +++ b/Worksheet Features/UnFreeze Panes/.NET/UnFreeze Panes/UnFreeze Panes/Program.cs @@ -19,7 +19,7 @@ static void Main(string[] args) worksheet.RemovePanes(); //Saving the workbook as stream - FileStream outputStream = new FileStream("Output.xlsx", FileMode.Create, FileAccess.ReadWrite); + FileStream outputStream = new FileStream(Path.GetFullPath("Output/Output.xlsx"), FileMode.Create, FileAccess.ReadWrite); workbook.SaveAs(outputStream); //Dispose streams