Oct 26 2023 12:06 PM
Oct 26 2023 12:06 PM
Question I have is, for some complex XML to populate a report, should I stick to C#.NET with Excel automation or attempt an XML import with an XSD or something? Preferably without an XSD if possible. Probably use an Excel template as the base. The more I write the more I think I should just stick to C# and they would need to find someone possibly from another department to do updates after I am gone.
Primarily I am a C# .NET programmer. I do some Office automation from C#, have done some VBA quite a while back, and done some formulas and fields in Excel.
Idea would be to have something that can be updated by a layperson with basic Excel skills for adding or modifying the simpler elements that may change in the xml over time. Although the more complex calculations would have to be done by a programmer likely.
Reason I ask is because
--some values are based on element names constructed with the portion of another elements value.
--Also, there would be 1 to many sheets based on the number of sections (i.e. SALESORDERs) containing data (in addition to 2 always included sheets).
--Elements may often need to be filtered based on other elements at the same level.
--Also on the fixed sheets a portion of that will have values in tabular data where a section would populate a column of it. So there would be a varying number of columns based number of salesorders.
As an example of complexity, in the following xml:
The value 5.2 from the item with itemname MyItem1 would be used to get the value from item with item name "MyItem23_2".
Where the _2 comes from number 2 after the decimal point.
And where the itempath has the number 5 from before the decimal point between the square brackets  at the end of the item path as seen here "...class4"
So it takes both the itemname and the itempath to differentiate a specific item when names are the same.
... <SOAP-ENV:Body> <asx:abap xmlns:asx="http://www...." version="1.0"> <asx:values> <SALESORDER> <Section1>... <ActiveSection> <item> <some elements not used etc.> <itemname>MyItem1</itemname> <value>5.2</value> <itempath>class1.class2.class3</itempath> </item> <item> <some elements not used etc.> <itemname>MyItem23_2</CHARC> <value>Some text or numeric value</value> <itempath>class1.class23.class4</itempath> </item> ...
Oct 27 2023 03:00 AM
Oct 27 2023 12:16 PM
Oct 30 2023 03:19 AM