Skip to content

Commit

Permalink
added xlsx support
Browse files Browse the repository at this point in the history
  • Loading branch information
koechlm committed Feb 19, 2019
1 parent ffd2fc3 commit ffe0579
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 6 deletions.
16 changes: 15 additions & 1 deletion JobExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ private void GenerateBOMReport(IJob job, Connection conn)
{
outPath = System.IO.Path.Combine(System.IO.Path.GetTempPath(), rootItem.ItemNum + ".xls");
}
if (settings.ReportOutFormat == "XLSX")
{
outPath = System.IO.Path.Combine(System.IO.Path.GetTempPath(), rootItem.ItemNum + ".xlsx");
}

LocalReport report = new LocalReport();
report.ReportPath = rdlcPath;
Expand Down Expand Up @@ -157,7 +161,17 @@ private void GenerateBOMReport(IJob job, Connection conn)
Warning[] warnings;
bytes = report.Render("Excel", null, out mimeType, out encoding, out extension, out streamids, out warnings);
}


if (settings.ReportOutFormat == "XLSX")
{
string mimeType;
string encoding;
string extension;
string[] streamids;
Warning[] warnings;
bytes = report.Render("Excelopenxml", null, out mimeType, out encoding, out extension, out streamids, out warnings);
}

if (System.IO.File.Exists(outPath))
System.IO.File.Delete(outPath);

Expand Down
4 changes: 2 additions & 2 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("24.0.0.1")]
[assembly: AssemblyFileVersion("24.0.0.1")]
[assembly: AssemblyVersion("2019.24.1.0")]
[assembly: AssemblyFileVersion("2019.24.1.0")]
4 changes: 2 additions & 2 deletions Settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
<attachUpdateReport>true</attachUpdateReport>

<!-- Output Format Option -->
<!-- Value must be PDF or XLS only -->
<ReportOutFormat>XLS</ReportOutFormat>
<!-- Value must be PDF or XLS (Excel 2003) or XLSX (Open XML, Excel 2010 and later) only -->
<ReportOutFormat>XLSX</ReportOutFormat>

<!-- Option to export report file to external location -->
<!-- If path is not empty file will export -->
Expand Down
4 changes: 3 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,6 @@ RELEASE NOTES:
Error handling - "Item's attached BOM report could not get attached. Check that items are not locked for the job user in the given state Settings.quickChangeState"
Error handling - "Item's attached BOM report could not get updated. Check that items are not locked for the job user in the given state Settings.quickChangeState"
23.0.0.0 - Updated Release 2018, Markus Koechl - forward compatibility for Vault Professional 2018
24.0.0.1 - Updated Release 2019, Markus Koechl - forward compatibility for Vault Professional 2019. Issue with option generatePartReports fixed.
2019.24.1.0 - Updated Release 2019, Markus Koechl - forward compatibility for Vault Professional 2019.
Issue with option generatePartReports fixed.
New - Option to export OpenOffice XML format for Excel (xlsx) in addition to PDF and Excel 2003 (xls)

0 comments on commit ffe0579

Please sign in to comment.