Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Reformat table

Hello everybody!

Need help with script for reformat my table. It's an import from XML file.

Is it possible to modify this:

Header 1Header 2Header 3
Ah1
Bh1
Ch1
a1v2
b1v2
c1v2
a2v3
b2v3
c2v3
a3v4
b3v4
c3v4

To table looks like:

ABC
a1b1c1
a2b2c2
a3b3c3
13 Replies
Not applicable
Author

Sure it is! Waiting for VB sample) But previous answer from Marco is also helpful!

Not applicable
Author

I think this is really one of the best solution)

MarcoWedel

Glad you like it.

regards

Marco

Not applicable
Author

Sure:

Module Module1

    Sub Main(ByVal Args() As String)

        Dim alr As Boolean, src As String, dst As String

        If Args.Length <> 3 Then

            Console.WriteLine("Usage: xml2xlsx.exe Visibility Source Destination")

            GoTo EOS

        End If

        alr = Args(0)

        src = Args(1)

        dst = Args(2)

    Dim appe As Object

        appe = CreateObject("Excel.Application")

        appe.Visible = CBool(alr)

        appe.displayalerts = False

        appe.Workbooks.Open(src)

        appe.Workbooks(1).SaveAs(dst, 51)

        appe.Workbooks(1).Close()

        appe.Quit()

EOS:

    End Sub

End Module

And the ready command line app attached...

Parameters:

Visibility - Tells whether the excel will be visible (1) or not (0) while performing Open/SaveAs

Source - Full path to xml file

Destination - Full path to result xlsx file

like that: xml2xlsx.exe 1 e:\test\AV.xml e:\test\av.xlsx