rahulrathore44 / trx2excel Goto Github PK
View Code? Open in Web Editor NEWUtility to Convert MSTest trx file to excel report file
Home Page: https://www.udemy.com/user/rahulrathore3/
License: GNU General Public License v3.0
Utility to Convert MSTest trx file to excel report file
Home Page: https://www.udemy.com/user/rahulrathore3/
License: GNU General Public License v3.0
Eccezione non gestita: System.InvalidOperationException: A worksheet with this name already exists in the workbook : GeoPlus.TestSuites.Recapito.Rec
in OfficeOpenXml.ExcelWorksheets.AddSheet(String Name, Boolean isChart, Nullable1 chartType, ExcelPivotTable pivotTableSource) in OfficeOpenXml.ExcelWorksheets.Add(String Name) in Trx2Excel.ExcelUtils.ExcelWriter.AddSheetToExcel(Dictionary
2 filteredData, ExcelPackage package, String nameSpace) in C:\Users\matbellara\Documents\TRX2EXCEL\Trx2Excel\Trx2Excel\ExcelUtils\ExcelWriter.cs:riga 63
in Trx2Excel.ExcelUtils.ExcelWriter.WriteToExcel(List`1 resultList) in C:\Users\matbellara\Documents\TRX2EXCEL\Trx2Excel\Trx2Excel\ExcelUtils\ExcelWriter.cs:riga 55
in Trx2Excel.Program.Main(String[] args) in C:\Users\matbellara\Documents\TRX2EXCEL\Trx2Excel\Trx2Excel\Program.cs:riga 28
Hey @rahulrathore44 !
I appreciate your work in this repo ๐
Why do create sheet per namespace? For me, a better way is to just list all my test result (across test namespaces) in a single sheet,
in a simple table where I can further process.
What do you think?
If you are using long namespaces, you can run into folowing error:
Unhandled Exception: System.InvalidOperationException: A worksheet with this name already exists in the workbook : TestsCjm.Tests.HF_Upgrade.C1027
at OfficeOpenXml.ExcelWorksheets.AddSheet(String Name, Boolean isChart, Nullable`1 chartType)
at OfficeOpenXml.ExcelWorksheets.Add(String Name)
at Trx2Excel.ExcelUtils.ExcelWriter.AddSheetToExcel(Dictionary`2 filteredData, ExcelPackage package, String nameSpace) in C:\Trx2Excel-master\Trx2Excel\ExcelUtils\ExcelWriter.cs:line 64
at Trx2Excel.ExcelUtils.ExcelWriter.WriteToExcel(List`1 resultList) in C:\Trx2Excel-master\Trx2Excel\ExcelUtils\ExcelWriter.cs:line 56
at Trx2Excel.Program.Main(String[] args) in C:\Trx2Excel-master\Trx2Excel\Program.cs:line 24
The program tries to create a new sheet for every namespace, but excel allows names with max length 31 characters and discards the rest. That can cause duplicit sheet names which results into beforementioned error.
Workaround with limitation
replace main content of Trx2Excel.ExcelUtils.ExcelWriter.FilterTheDataWithNameSpace
with return new Dictionary<string, List<UnitTestResult>> { { "Resuls", resultList } };
and recompile ...
which will display all results on single sheet
C:\Users\ajay.b\Downloads\Trx2Excel-master\Trx2Excel-master\Trx2Excel\bin\Debug> Trx2Excel.exe "C:\Users\ajay.b\Downloads\trx2html\sourceCode\sourceCode\TRX2HTML Solution-DEV10\trx2html\test\SampleTestResult.trx" "C:\Users\ajay.b\Downloads\abc.xlsx"
I had used above text in Command line but it throws exception like : -
Unhandled Exception: System.ArgumentNullException: Value cannot be null.
Parameter name: value
at System.Enum.TryParseEnum(Type enumType, String value, Boolean ignoreCase, EnumResult& parseResult)
at System.Enum.Parse(Type enumType, String value, Boolean ignoreCase)
at Trx2Excel.TrxReaderUtil.TrxReader.GetResult(XmlDocument doc, XmlNode node) in C:\Data\GitHub\Trx2Excel\Trx2Excel\TrxReaderUtil\TrxReader.cs:line 45
at Trx2Excel.TrxReaderUtil.TrxReader.GetTestResults() in C:\Data\GitHub\Trx2Excel\Trx2Excel\TrxReaderUtil\TrxReader.cs:line 35
at Trx2Excel.Program.Main(String[] args) in C:\Data\GitHub\Trx2Excel\Trx2Excel\Program.cs:line 21
plz help regarding to this issue.....
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.