Writing data to an XLS file without Excel
Download a Free Trial Version. It allows you to try all features! Plugins can be downloaded separately here
We are filling bags of powder on a 6 head filling machine and require to
record each bag weight as it comes off the filling machine. We would like to have data sent directly into a Microsoft Excel spreadsheet.
weight recorded to be in a row. Each log file for each day to be a new
spreadsheet. Each new sheet is to be labeled as the day of the
data recording. Typically there will be
approximately 1000 recorded data entries for the production for the day.
We only require the "date" and "head weight" figure to
be inserted into the spreadsheet.
It is assumed that:
You've prepared parser items for export.
For this tutorial all items were prepared in the previous part.
Also you may read other examples:
All parser items are now ready for export to "Local database" plug-in. Please, open the configuration window of the "Local database" plug-in (fig.1 and 2) by selecting the module in a list and clicking the "Setup" button on the "Data export" page.
Fig.1. Export to Excel. Selecting a database.
Fig.2. Export to Excel. Selecting a database.
Just select a database type in the field #1, in the field #2 type or select a path, where new files
will be created and specify a file name prefix in the
On the next tab, you should specify basic format options as per fig.3.
Fig.3. Export to Excel. Format options.
Because one of our variables has the "float" data type, then we should specify a necessary
decimal separator in the field #1. The next variable has the "time" data type, therefore
you should specify a time separator in the field #2 and the option in the field #3 too. The option at the pos.3 allows you to add leading zero before hour, month or year digits. Other options are unnecessary in our case, because we don't use other data types.
On the last page "Columns order" (fig.4) you can specify,
how our variables will be being placed in a spreadsheet. Because we need 2
variables only, therefore, please, create 2 items on this page by pressing
the "Add item" button (fig.4, pos.1).
Fig.4. Export to Excel. Column order options.
Any new items may be added by clicking the "Add item" button (Fig.4, pos. 1). Before adding an item the program will ask you about an item description. You can type any characters here, which will help you to remember a variable's content. For this example 2 variables with their corresponding descriptions have been added.
Each data export item has a number of properties:
- Parser item name - is a
parser variable name, which you have created in the parser configuration.
You may select a variable name from a drop-down box or type this name manually;
- Column order - is a column number in a spreadsheet for this variable.
The minimum value is 1;
- Column length - is a column width in a spreadsheet.
You may change this width in Microsoft Excel later.
Click the "OK" button and close the local database plug-in configuration
window and the "OK" button in the options window.
Okay, all settings have been completed and we are ready to capture weight data from
scales to an Excel file.