XSL Taking XML transforming it into Excel

后端 未结 1 807
一向
一向 2020-12-17 22:25

New guy here so bear with me. Ive got a basic XSL file that will read my xml data. Im trying to put xml into Excel. Heres my issue. With a small XML file it seems to conver

1条回答
  •  眼角桃花
    2020-12-17 22:56

    I think you need this stylesheet:

    
        
            progid="Excel.Sheet"
            
                
            
        
        
            
                
                        
                            
                                
                                    
                                
                            
                        
                    
                

    With this input (proper well formed):

    
        
            
                Checks for Company X
                
                    123456789
                
                My Company
                2010-08-23
                07:08:54-0700
                1.0
                0
                0
            
            
                My Banking Name
                
                    ShortBankName
                
            
            
                My Company
                
                    MYCO
                
            
        
        
            
                Items
                654811650
                
                    Items
                
            
            
                
                    Paid Checks
                    1239668334710
                    
                        Paid Checks
                    
                
                
                    check
                    2960
                    
                        2009-06-12
                        87654321
                        123465798
                        007725552898
                        001152
                        2960
                        55225410
                    
                
            
        
    
    

    Output:

    
    
        
            
                    
                        checkItemType
                    
                    
                        checkAmount
                    
                    
                        date
                    
                    
                        RT
                    
                    
                        accountNumber
                    
                    
                        seqNum
                    
                    
                        trancode
                    
                    
                        amount
                    
                    
                        serialNumber
                    
                
                    
                        check
                    
                    
                        2960
                    
                    
                        2009-06-12
                    
                    
                        87654321
                    
                    
                        123465798
                    
                    
                        007725552898
                    
                    
                        001152
                    
                    
                        2960
                    
                    
                        55225410
                    
                

    Wich is properly open by Excel.

    Note: those fn:local-name() are there because your input sample is unreliable.

    0 讨论(0)
提交回复
热议问题