Order Entry from Excel

Perhaps the most requested automation for Spire is the ability to add sales orders to the system. The Spire API makes this very easy. Only the bare minimum of information is required to add an order. For any information not provided, the Spire API adds the correct data automatically as if you were typing the order into Spire manually.

This demonstration and sample Excel spreadsheet covers the basics of how to make this work. But this time, I include the XLSM file rather than code snippets so you can see it in action with little fuss.

It is suggested that you use Inspire demo data, as the part numbers and customer numbers already exist.

The OrderDetails worksheet contains the orders to import:

The CompanyInfo worksheet contains the settings for the Spire company:

Edit the CompanyInfo sheet to reflect your Spire server, database and user settings.

There is a macro called “ImportOrders” linked to the Ctrl-Shift-I shortcut. After running the macro, you should see:

The last line of each order is updated with the result of the import.

This project contains a component called VBA-JSON by Tim Hall. His copyright and generous licensing information is included in that module.

You can download the Excel file here.

This Post Has 5 Comments

  1. John Hill

    This is a great option. Can you run through how to change the range of import? I can only get the first 4 lines to import.

    1. Peter Wright

      John, I have responded to your question by email. You need to increase the size of the named range “OrderDetails”

  2. Matthew Lefkowitz

    I’m interested in this to import orders from Excel with some line item UDFs.

  3. Noli Guerrero

    I can’t download the excel file.

    1. Peter Wright

      Sorry about that Noli, you should be able to download now.

Comments are closed.