ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   show XML data horizontally (https://www.excelbanter.com/excel-programming/359009-show-xml-data-horizontally.html)

blackpuppy

show XML data horizontally
 
I am working on reports using VSTO with Excel.

The program will produce the report data in XML and import into Excel. But
when I design the format and drag the data from XML Source, the data will be
shown vertically. And the report will be arranged in a cascade manner. I
wonder if there is a way to change this default behavior. That is, instead of
showing the data vertically, I want to show the data horizontally.

For example, a sales report about for various products in different areas
will be like this.

Area A
Product X Amount 1
Product Y Amount 2
Area B
Product X Amount 3
Product Y Amount 4
.....

I want to arrange the product horizontally, as shown below.

Product X Product Y
Area A Amount 1 Amount 2
Area B Amount 3 Amount 4

Does anyone have any idea?

Thanks!
--
The more you know, the less you know.

David McRitchie

show XML data horizontally
 
If you can produce your report with the area on the same row
so that each record has Area, Product, Amount
then you could use Pivot Tables http://www.contextures.com/tiptech.html

---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"blackpuppy" wrote ...
I am working on reports using VSTO with Excel.




blackpuppy

show XML data horizontally
 
What I want is each area per row. In each row, the 1st column is the area
name, the 2nd column is the sales amount for product X, the 3rd column is the
sales amount for product Y, and maybe the 4th column for product Z, etc.

Any instructive guide on how to do this? I am not familiar with the
formatting in Excel, such as using Pivot.

Thanks!
--
The more you know, the less you know.



All times are GMT +1. The time now is 06:37 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com