Crazy Beleg offers the possibility to import customer and artile data. It is also possible to export documents, created in the app, to process them further in other programs. The exchange format for both import and export is an XML file.
The simplest form of data exchange is to export the data from an Microsoft Excel® file. Unfortunately, Microsoft Excel® does not provide a direct way to save a table as a pure XML file. The necessary steps are summarized in this wiki. All screenshots comes from Microsoft Office® 365. The individual points may slightly differ in different versions, but the general procedure is the following:
If the developer tools do not appear in the menu bar, this menu needs to be enabled.
To enable the menu do the following steps:
* Open the File menu – Options
* click at the option „Customize Ribbon“ and activate in area „Customize the Ribbon“ the entry „Developer"
You will see the Options menu
* Close the Options by clicking "OK"
* Now you should see the developer menu and you can choose
Install the XML scheme for the Import and Export of XML files
In order to import or export data from the Crazy Document app, you need a scheme. Please download the following ZIP file and extract and save the files on your local computer.
* XML Scheme of downloaded documents: schemaDocument.xml
* XML Scheme of customers to import into the app: schemaCustomers.xml
* XML Scheme of items to import into the app: schemaItems.xml
Import all XML Schemas as data source in Microsoft Excel:
* Choose the development tools menu and click "Source"
* Click „XML Maps...“ in the window „XML Source“
* Click „Add...“
* Choose the first downloaded XML scheme "schemaItems.xml“ an click "Open". You should see an entry in the table above.
* The new entry with name "item_Map" is now ready to use. You can rename it when you cklick the button "Rename..." and overwrite the existing name (remember for later use)
* Repeat the last two steps with the other schemas, "schemaCustomers.xml" and "schemaDocument.xml"
* Your XML mapping window should now look something like this:
* Click "OK"
Now you have imported the two XML schemas in your Microsoft Excel workbook. You should save your workbook for future projects. You can use a copy of this workbook.
Use the XML Scheme in a workbook to import data into the Crazy Documents App
You have a workbook that you want to use as the data source to import the data into the Crazy Document app.
* Open your workbook which you will use for your upload and import the XML Scheme „schemaItems.xml“ as described above or use a workbook which you have prepared as described in the chapter above
In my example, I use the following data:
* Open the developer menu and choose the XML source "item_Map" (or your nam if you have renamed it)
* To assign the data in the table, the XML elements, drag items from the displayed tree to your worksheet. If you do not want to use an attribute, simply ignore it. Use the XML elements as follows:
itemID: Unique item ID. This number is also output in the documents to establish a clear reference to your article master. This number can not be changed in the app.
itemDescription1: Description of an item
itemDescription2: Additional description of an item
itemCode: Barcode of an item
itemPrice: Net selling price
itemDiscount: Discount in percent (10% equals 0.10)
itemUnit: Sales unit of the article to which the price is based
* To import the customer data, please use the following attributes:
customerID: Unique customer number. This number is also output in the documents in order to establish a clear reference to your customer master. This number can not be changed in the app.
customerName: Name of the customer
customerStreet: Street of customer's address
customerZipCode: ZIP-Code of customer's address
customerCity: City of customer's address
customerPhone: Phone number (only for information)
customerDiscount: customer's discount (currently not used)
* After assigning the XML elements to the values in the table your workbook should look something like this:
* To export the data from Microsoft Excel, select the "Developer" menu and select "Export"
* If you have only one scheme in your workbook, this will be used without an upcomming dialog. In case you have two or more schemas, choose the import scheme and click "OK".
* Save your file in your Dropbox folder "Apps/CrazyDocument" or an other folder and click "Export". If you did not choose the Dropbox folder, copy the file in the folder "Apps/CrazyDocument" of your Dropbox.
* The name of the file for your items must be "items.xml" and for customers "customers.xml". Otherwise, the data can not be found.
* Now you should see a new file in your Dropbox
* Crazy Beleg has an option for the automatic import of master data. If you enable this option in the app, each time the app is activated, it checks to see if new customer or article data exists in your dropbox. You only need to copy a new file to the directory. The next time you launch the app or activate the current app from the background, your new data will be imported.
During the import the app is checking whether there is already a customer or article number. If yes, the master data are accepted without losing the reference in the documents. If a customer or item number does not yet exist, it is created.
Import of master data
Open the Crazy Document app on your iDevice. Customers are to be imported as an example.
* Select the "Customers" area and tap the Action button (at the top right)
* If the data can be processed and the structure of the data in the XML file is identical to that of the schema, an appropriate message is displayed and the data is displayed in the background.
The articles can also be imported analogously to the import of the customer data. Just select the Action button in the article display.
Export documents from the app
You have entered a document completely and want to close it now. To this purpose, the app offers several possibilities which you can reach via the action button in a displayed document:
* Save a document without additional action
* Print a document and export XML and PDF to Dropbox
* Print document / PDF only
* Export a document only
Save a document without additional action
This action saves only the current document. No data is printed or exported to the Dropbox. Save this action for later editing.
Print a document and export XML and PDF to Dropbox
This action will give you a preview of how your printed document will look like. The document is automatically saved.
To complete a document, tap the printer button at the top right. A print dialog is displayed in which you can select the correct output channel for you. On the one hand, this can be an AirPrint-enabled printer that is connected to your device or another app that takes the printout for you. It can also be apps from printer manufacturers, which offer the possibility to receive a document to be printed over the document exchange.
Select an available item from the list. If the app is able to transfer the document or print to an AirPrint printer, the document is marked as processed and an XML as well as an PDF file are automatically saved in your Dropbox.
Print document / PDF only
This action automatically saves the document and displays a preview. From here you can print the document as described above or save it as a PDF in your Dropbox. The data is not exported as an XML file. This action is used to print a document again without changing the data.
Export a document only
This action automatically saves the document and saves a new XML file in the Dropbox. There is no printout or export of the PDF file.
Structure of the XML file of a document
You can open the XML saved in the export with Microsoft Excel with the XML schema for downloaded documents (schemaDocument.xml). If you have installed the XML schema as described above, you can now double-click on the XML file in your Dropbox "Apps/CrazyDocument" directory and get the contents of your document.
The structure has the following meaning:
document: Unique identification of a document (Only once per document)
documentID: Document ID
createdAt: Creation date of the document
documentCustomerID: Unique customer number from customer base
documentNet: Net total of the document
documentTax: Amount of full VAT of the document
documentTaxReuduced: Amount of reduced VAT of the document
documentTotal: Total of the document (including all VAT amounts)
documentPaymentDays: Payment term in days
documentPaymentCashDiscount: Discount rate of the payment destination in percent
documentPosition: Identification of a position in the document (can occur several times)
positionID: Position ID of an item in the document
positionQuantity: Quantity of the item in the position
positionDiscount: Discount of the item in the position
positionTotal: Price of the position considering quantity and discount
positionItemID: Unique article number from the article master
In addition, you can use the Settings -> Section Import- and Export Options -> Export Master Data to specify whether you want to export the master data of the customer and the items. By default this option is disabled. The corresponding tags can be found in the description of the customers or articles.
Customize the XML structure to your own requirements
For the import of the data, a fixed structure and a clear identification is required to be successfully processed by the app. Not always these unique names (tags) fit your needs. For this reason the app provides a possibility to map the tags to your requirements. You can find it in Settings -> Section Import and Export Options -> XML mapping costomization. Here you can change all tags for the customer, item and document data.
The mapping for the document is shown here in the example. You can enter the tags to be used in the XML file. The short description can be found in the description of the structure. Please note that the tags are Case Sensitive!