Command line

Dokumentation •
In diesem Artikel

Banana can be started by giving a series of command (for a list of command and examples file see below).

Example: open a file
banana90.exe c:\temp\example.ac2

 

Rule for command line command

  • The arguments need to be preceded by a minus “-” sign. If an argument is missing of the “-” sign, it is interpreted as the name of the file to open.
  • Include the whole argument within the delimiter “…” if the text include whitespace.
  • Running import as command in the command line save the accounting file on exit

If a command fail, than a return code different than 0 is returned, and the error is inserted in the log file (only if the option –log_file was used).

Examples

Example: open a file:

banana90.exe c:\temp\example.ac2

 

Export to xml file

banana90.exe -cmd=export "-cmd_file=c:\temp\my example.ac2" "-cmd_p1=c:\temp\myexample.xml" -cmd_p2=xml -period_begin=2006-01-01 –period_end=2005-03-30

Example: import transactions (use the file name with the proper directory name)
Use also a log so that you know the error

banana90.exe -cmd=import -cmd_file="company.ac2" -cmd_table=Transactions -cmd_p1=import_mov.txt -cmd_exit=1 -log_file=log.txt

For detail information regarding the import of transaction see the page "Importing in txt format".

Available Command

The argument “–cmd=…” specifies the command to be executed. The other arguments specify the option for this command.

The command can be used as a command line  or a DDE request.

Argument

Description

cmd=

The command to execute

  • file_open (cmd_p1=noshow)
  • file_close (cmd_file)
  • file_save (cmd_file)
  • file_saveas (cmd_file, cmd_p1)
  • file_show (cmd_file)
  • get_tableinfo  (cmd_file , cmd_table)
  • get_getcell (cmd_file , cmd_table, cmd_column, cmd_row)
  • get_getline (cmd_file , cmd_table, cmd_column, cmd_row)
  • get_lasterror
  • set_language(cmd_p1)
  • calc_all (cmd_file)
  • calc_simple (cmd_file)
  • deleterows (…)    *)
  • export (…)
  • fileinfo (…)
  • import (…)    *)
  • acc_accountcard (…)
  • acc_externalreport (…)
  • acc_vatreport (…)
  • version.
    Program return the version number and terminate.

1) Running import in the command line save the file on exit;
*) If you use the commands “deleterows” and “import” directly from a command line the file is automatically saved on exit

 

 

List of arguments

Command

Argument

Description

From command line

cmd_exit=1

The program should exit and terminate
Note if you use the command import= then the file that has been opened is automatically saved when the program terminate.

nonetwork

Turn off all connections to the network (i.e. to check for updates, integrated web-server, ...)

For all commands

cmd_file=

the file to use or open

cmd_pw=

password to open the file

cmd_names=

A - Field name in XML (default on)

a - Field name in original language

log_file=

set the log file name for writing messages (if no file name no log)

deletelines

cmd_p1=

start of line to delete (number)

cmd_p2=

how many lines to delete (if not present = 1)

cmd_table=

The name of table

 

 

 

set_language

cmd_p1=

The two letter ISO639 language code (de, fr, en, it)

 

 

 

file_open

cmd_p1=

noshow – do not show the file

 

 

 

file_saveas

cmd_p1=

file name of saved file

 

 

 

get_tableinfo

cmd_table=

The name of the table to get info

 

 

 

get_getcell

cmd_table=

The name of the table

cmd_row=

The number of the row, or an expression like “Account=1000:3” (In this ex. the third row where the field Account is equal to 1000 is used)

cmd_column=

The name of the column

cmd_op=

A – Format value (default on)

get_getline

cmd_table=

The name of the table

cmd_row=

The number of the row, or an expression like “Account=1000:3” (In this ex. the third row where the field Account is equal to 1000 is used)

cmd_op=

A – Format value (default on)

export

export_use_param

Instead of the default parameters use the last saved parameters (set with the dialog)  and then applies the specified options with the other arguments

cmd_p1=

file name of the export file

cmd_p2=

Type: html, excel, xml

cmd_table=

The name of table to export (only the table is exported)

export_include=

Options:

Upper case(A) = on; Lower Case(a) = off

A - Recheck accounting (default on)

B - Include statistics table  (default on)

C - Include transaction table  (default on)

D - Include account table  (default on)

E - Include category table  (default on)

F - Include total table  (default on)

G - Include Exchange rate table  (default on)

H - Inclue Vat code table and vat report  (default on)

I - Include Period Accounts  (default on)

L - Include Period VAT  (default on)

M - Create periods for the whole year  (default off)

N – Create accounts card

export_include_ma=

number of months for accounts period, for  option I, (default 1)
-1 for daily

export_include_mv=

number of months VAT period, for option L (default 3)

export_include_mm=

max numbers of periods (default 36)

export_op_html=

Options for html

A - Use style sheet

B - Use predefined style sheet (default on)

C - Include style shett within html file (default on)

D - Export visible fields only (default on)

E - Table with borders (default on)

F - Columns with headers (default on)

G - Preserve page breaks within the table (default on)

 

export_op_excel=

Options for Excel export

A - Define cell name  (default on)

B - Define table name (default on)

C - Use Xml names (default on)

D - Protect tables  (default on)

export_op_xml=

Upper case(A) = on; Lower Case(a) = off

A – Visible field only (default off)

B – Include view list (default off)

period_all

period All

period_begin=

Begin date (yyyy-mm-dd)

period_end=

period End date (yyyy-mm-dd)

vat_use_param=

Instead of the default parameters use the last saved parameters (set with the dialog)  and then applies the options specified with vat_op

vat_op=

A - Include transactions

B - Include total account

C - Include total codes

D - Include total percentage

E - Use own group schema

F - Only code specified

G - Only group specified

vat_sort=

sort field

vat_text=

single code or groups (to use with –vat_op F and G)

 

 

fileinfo

cmd_op=

A – Recalculate all (default off)

import

cmd_p1=

File name of the file to import. Data have to be separated by tabulator, and the first row has to contain the name of the fields.

cmd_p2=

Insert al line number (0=Append to end)

cmd_op=

A - Complete imported raws

cmd_table=

The name of table where to insert the data
(Accounts, Transactions, …)

 

 

acc_accountcard

cmd_p1=

account number

cmd_p2=

field name for sorting

period_all

period All (default)

period_begin=

Begin date (yyyy-mm-dd)

period_end=

period End date (yyyy-mm-dd)

acc_externalreport

cmd_p1=

file name of the report

cmd_p2=

column name for grouping

cmd_op=

Upper case(A) = on; Lower Case(a) = off
A - Include account with balance = 0

B - Include account with no transactions

C - Include totals only

D - Notify if an account is without a group

 

 

acc_vatreport

period_all

period All (default)

period_begin=

Begin date (yyyy-mm-dd)

period_end=

period End date (yyyy-mm-dd)

vat_use_param=

use parameters from existing dialog  + specified options like vat_op

vat_op=

Vat options

Upper case(A) = on; Lower Case(a) = off

A - Include transactions

B - Include total account

C - Include total codes

D - Include total percentage

E - Use own group schema

F - Only code specified

G - Only group specified

H – Not used groups

vat_sort=

sort field

vat_text=

single code or groups (to use with –vat_op F and G)

 

 

 

Helfen Sie uns, unsere Dokumentation zu verbessern

Ihre Anregungen, wie wir diese Seite verbessern könnten, sind uns jederzeit willkommen.

Sagen Sie uns bitte, welches Thema eine bessere Erklärung braucht oder wie wir ein Argument verständlicher erklären könnten.

Diesen Artikel teilen: Twitter | Facebook | LinkedIn | Email