Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,10 @@ static void Main(string[] args)

#region Save
//Saving the workbook
FileStream outputStream = new FileStream(Path.GetFullPath("Output/CreateCustomXML.xlsx"), FileMode.Create, FileAccess.Write);
workbook.SaveAs(outputStream);
workbook.SaveAs(Path.GetFullPath("Output/CreateCustomXML.xlsx"));
#endregion

//Dispose streams
outputStream.Dispose();

//Open default JSON
}
}
}
}





}
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ static void Main(string[] args)
{
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
FileStream inputStream = new FileStream(Path.GetFullPath(@"Data/InputTemplate.xlsx"), FileMode.Open, FileAccess.Read);
IWorkbook workbook = application.Workbooks.Open(inputStream, ExcelOpenType.Automatic);
IWorkbook workbook = application.Workbooks.Open(Path.GetFullPath(@"Data/InputTemplate.xlsx"), ExcelOpenType.Automatic);
IWorksheet sheet = workbook.Worksheets[0];

//Access CustomXmlPart from Workbook
Expand All @@ -26,19 +25,9 @@ static void Main(string[] args)

#region Save
//Saving the workbook
FileStream outputStream = new FileStream(Path.GetFullPath("Output/ReadXml.xlsx"), FileMode.Create, FileAccess.Write);
workbook.SaveAs(outputStream);
workbook.SaveAs(Path.GetFullPath("Output/ReadXml.xlsx"));
#endregion

//Dispose streams
outputStream.Dispose();
inputStream.Dispose();
}
}
}
}





}