Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-17-2017, 12:55 AM
sumshen sumshen is offline Read multiple xml files in excel - Column names and Tag - Column alignment Windows 7 64bit Read multiple xml files in excel - Column names and Tag - Column alignment Office 2013
Novice
Read multiple xml files in excel - Column names and Tag - Column alignment
 
Join Date: Apr 2017
Posts: 1
sumshen is on a distinguished road
Default Read multiple xml files in excel - Column names and Tag - Column alignment

Hello All,



I am using the below code to read multiple xml files into a single excel worksheet.
I am looking to do below 2 amends:
  1. Display only the tag names instead of full path as column names.
  2. If one of the xml files has additional tags which contain data, the excel data gets jumbled. I want to align the columns of excel and display blanks in columns if tags are not present. For egs, in attachment, I want to align D7-D11 in Column E.

My Code:

Do While xFile <> ""
Set xmlWb = Workbooks.OpenXML(folderPath & "\" & xFile)
xmlWb.Sheets(1).UsedRange.Copy xlSWb.Sheets(2).Cells(xCount, 1)

Application.DisplayAlerts = False
xmlWb.Saved = True
xmlWb.Close False
Application.DisplayAlerts = True

xCount = xlSWb.Sheets(2).UsedRange.Rows.Count + 1
xFile = Dir()
Loop
Attached Images
File Type: jpg Capture.JPG (88.6 KB, 10 views)
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Read multiple xml files in excel - Column names and Tag - Column alignment Embedded Excel in Powerpoint - custom animation, display column by column andytheanimal PowerPoint 2 01-20-2015 06:30 AM
Read multiple xml files in excel - Column names and Tag - Column alignment Multiple Row Headings and Last Column Alignment Pecan Word Tables 6 09-13-2013 12:20 PM
Read multiple xml files in excel - Column names and Tag - Column alignment matching names in column A with names in column C bob999999 Excel 1 04-28-2013 11:21 AM
Read multiple xml files in excel - Column names and Tag - Column alignment Automatically enter date into a column and make that column read only Mr Davo Excel 1 10-29-2012 01:07 AM
Read multiple xml files in excel - Column names and Tag - Column alignment Unwanted column alignment SquareAce Word Tables 4 11-08-2011 01:28 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:11 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft