How to Create xml file when accounting invoice with inventory stored in excel

Anonymous
2019-10-29T12:43:46+00:00

sir, i want to create xml file  when user enter data in vb module form and  data stored in separated sheet and should  auto create invoice template,  i find it user module form with help of https://www.exceltrainingvideos.com/automate-invoice-creation-with-vba/  and how to Generate above data in xml from separated sheet.

i could not write complex macro code for account invoice with inventory, because  unique invoice with date and list of inventory data multiple Row,

i below attached jpeg file - saw, i round on picture,  invoice and date , list of inventory data, that is single invoice with date and also included list of list inventory, and some column also zero,  see IGST in first column and CGST AND SGST in second column, 

Please refer any book or sample code for Accounting invoice xml from Excel, not using excel Mapping , it is not working already i tried.

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes

16 answers

Sort by: Most helpful
  1. Doug Robbins - MVP - Office Apps and Services 322.1K Reputation points MVP Volunteer Moderator
    2019-10-30T08:56:29+00:00

    If you want to create invoices containing one or multiple items for each purchaser, from data stored in an Excel Workbook you could use the Many to One facility on my Merge Tools Add-in that is contained in the MERGE TOOLS ADD-IN.zip file that you can download from the following page of my One Drive:

    http://bit.ly/1hduSCB

    Extract the files from the archive and read the:

    “READ ME – Setting up and using the Merge Tools Add-in.pdf

    to see how to install and use the various tools.  Using those tools, it is possible to perform the following types of merge that cannot be done with Mail Merge “out-of-the-box”:

    ●    Merge to e-mail messages either with or without attachments, with the documents created by the merge being sent as either Word or PDF attachments or as the body of the e-mail message.

    ●    Merge to individual documents in either Word or PDF format with the filenames being supplied by the data in one of the fields in the data source

    ●    Many to One type merges, which can be used for creating documents such as invoices where there are multiple records in the data source that have common data in one of the fields

    ●    Merging to a document that will include a chart that is unique to each record in the data source

    ●    Merging a document with Content Controls

    ●    Merging a document that contains Legacy FormFields

    ●    Duplex Merges

    ●    Merging to a printer that will collate and staple the output created from each record in the data source.

    The requirements for using the system are:

    ●    The mail merge main document must be of the Letters type, though that does not mean that the output cannot be sent as an e-mail message where relevant.

    ●    For the Many To One, Merge with Attachments and Merge to Individual Docs utilities, the data source may be either a table or query in an Access database, or in the form of an Excel worksheet and that worksheet must be the first sheet in the Excel workbook. If the data is on some other sheet, you can easily move that sheet so that it is the first sheet in the workbook by clicking on the sheet tab and dragging it to the left.  For the Chart Merge utility, see the Mail Merging with Charts document that is included in the Merge Tools Add-in Zip file for additional requirements for the data source for use with that utility

    ●    For a data source in the form of an Excel worksheet, the field names must be in the first row of the worksheet and there must be a field name in all of the cells in that row that are within the range of columns that contain the data.

    ●    For both types of data source, the field names must contain only alphanumeric characters (No @,#,$,%,&,(,), etc) and the field names must not start with a numeric character (0-9). The number of characters in the field names, including spaces, must not be more than 40

    .

    0 comments No comments
  2. Anonymous
    2019-10-30T10:31:01+00:00

    sir, invoice data stored in separated  sheet, okay, example : one invoice stored more than three rows, in three rows as one invoice,  invoice No and date unique, but inventory data with amount difference, i would like to export entire purchase register as xml from excel, i need sample macro code for  many rows merged to one invoice and export xml file, not multiple xml file, just single xml with contain more invoice data and inventories, in xml file, donot  repeat invoice no and date many more time, but   single time only repeat, please suggest sample macro excel code for creating xml data  from purchase register.

    0 comments No comments
  3. Anonymous
    2019-10-30T11:43:35+00:00

    one more Example :  create xml file from excel sheet, sample data in jpeg picture  below that is Purchase Register in excel , i highlight four different of color, each color as one invoice , in the excel sheet contain 4 invoice with inventory data, and some columns as zero,    

    sample xml code for above picture , please suggest Right vba macro code for below xml tree structure.

    <?xml version="1.0" encoding="ISO-8859-2"?> <Invoices> <invoice_id>2246</invoice_id> <invoice_date>2016-09-10</invoice_date> <shipping>10</shipping> <invoice_total>349.00</invoice_total> <product> <product_name>Samsung Galaxy</product_name> <product_price>250.00</product_price> <quantity>1</quantity> <total_cost>250.00</total_cost> </product> <product> <product_name>Samsung Fast</product_name> <product_price>89.00</product_price> <quantity>1</quantity> <total_cost>89.00</total_cost> </product> </Invoice>

    0 comments No comments
  4. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  5. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more