Excel to XML

ballan91

New Member
Joined
May 14, 2011
Messages
1
I'm not new to excel but I am new to XML as well as using VBA. What I have done is created a series of formulas that generate a formatted XML document within an excel spreadsheet; that i can then use to import to adobe forms from a spreadsheet with the data i need in the form.

Now what I would like to do so that this is user friendly, (as i won't be the only one using it) is create a button linked to a VBA macro that would essentially do this:

select from A1:A500
remove any lines at the bottom that may be blank
append B1:B25 to the bottom
export to xml and save with a user specified filename

I think I have the logic down ok, but it is the rest that I am completely unsure of, I've done some surfing around and I should be able to use the following code to save the file to xml, but I'm not sure on the whole selecting etc...

Code:
ActiveSelection.SaveAs _
   Filename:="$ufilename", _
   FileFormat:=xlXMLSpreadsheet

Any help would be greatly appreciated!
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.

Forum statistics

Threads
1,224,602
Messages
6,179,843
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top