Macro to generate XML

RAJESH1960

Banned for repeated rules violations
Joined
Mar 26, 2020
Messages
2,313
Office Version
  1. 2019
Platform
  1. Windows
A macro will be very useful if anyone can create a very challenging macro in excel by the name Generate XML

In the excel sheet, It should first select data from say A2 to the last column say A50 and from A2 to the last row where the data is entered say A1000. Note: -This data may vary in rows and columns from time to time.Hence the data should be copied till the last row where there is data. Copy it.

A file is saved in the folder ABC on the desktop. Open the file. There are different types of file folders in the folder. Select the sheet with the name ImportData.xml, right click and open in Notepad + +, paste the copied data from excel in the importdata.xml sheet in a particular line say line 15. Save the xml sheet and close. Right click the folder Importdata.xml, go to properties, click the security tab, select the whole path mentioned next to object name and copy.

Next it should go to the tally folder. A tally is already open with a company name. It is at the start - home page Gateway of Tally. In tally it should select and enter the “import data option” which will take you to another folder “import data”. In import data select the vouchers option and enter. That option will take you to another folder import vouchers and in the name of the file to be imported (XML) , paste the path copied from Importdata.xml in the space.

The macro should stop here after the path is pasted in tally.
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
A macro will be very useful if anyone can create a very challenging macro in excel by the name Generate XML

In the excel sheet, It should first select data from say A2 to the last column say A50 and from A2 to the last row where the data is entered say A1000. Note: -This data may vary in rows and columns from time to time.Hence the data should be copied till the last row where there is data. Copy it.

A file is saved in the folder ABC on the desktop. Open the file. There are different types of file folders in the folder. Select the sheet with the name ImportData.xml, right click and open in Notepad + +, paste the copied data from excel in the importdata.xml sheet in a particular line say line 15. Save the xml sheet and close. Right click the folder Importdata.xml, go to properties, click the security tab, select the whole path mentioned next to object name and copy.

Next it should go to the tally folder. A tally is already open with a company name. It is at the start - home page Gateway of Tally. In tally it should select and enter the “import data option” which will take you to another folder “import data”. In import data select the vouchers option and enter. That option will take you to another folder import vouchers and in the name of the file to be imported (XML) , paste the path copied from Importdata.xml in the space.

The macro should stop here after the path is pasted in tally.
To understand better, I am posting a link where this kind of macro may have been already created by a excel fan.
 
Upvote 0
I have made this as simple as possible for anyone to understand. Please help me to create this macro.
 

Attachments

  • Untitled.png
    Untitled.png
    17.3 KB · Views: 44
Upvote 0

Forum statistics

Threads
1,214,822
Messages
6,121,772
Members
449,049
Latest member
greyangel23

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