C21 Help Menu


21st Century Accounting Help - Payroll/Timecards

Import Timecards

Automatic “Generic” Import

The current version of 21st Century Payroll automatically imports a timecard file if the file conforms to the specifications described below.   The import process requires the presence of one configuration text file and at least one timecard data file.  When the files are configured and placed as specified, the following message pops up when you run Calculate Payroll:
Import Timecard 1
The following message is displayed when you run Timecards:
Import Timecard 2

Configuration File

A generic import configuration file with the name TIMECARD_IMPORT.CFG is included with the software.  It is in the data folder.  Customized import configuration files for individual companies can be placed in the company folders, where the import program will look first.  If the configuration file isn’t found in the company folder, the program falls back to the configuration file in the data folder.

Move the TIMECARD_IMPORT.CFG file to the company data folder you will be importing into. Open the file using Notepad or Ultraedit or some similar program. Your import file should conform to the configurations outlined here. Scroll to bottom of the folder and look for IMPORT_FILE_PATH = prntime.tab. Change "prntime" to reflect the name of your import file. This file should end in .csv or .tab.

Create an "Import" folder in your company data folder. This is where your import file should be placed. The name of the file needs to match the name listed in your TIMECARD_IMPORT.CFG file.

The configuration file currently supports two keywords that can exist in any number of pairs.  Current keywords are column_list and import_file_path.  The keywords define the expected fields in their expected order in the timecard data file(s) and the location(s) of the timecard data file(s).

  • column_list.  Defines the list of fields and order to be expected in the rows in the import file.  Fields followed by an asterisk (*) are required.  The possible fields are

employeeID*   timecardEndDate*   workDate   incomeFactorID*   hours*   pieces   amount   departmentID*   glAccountID   job   phase   category   workersCompCode

  • import_file_path.  Identifies the path name of a file to import.  There can be any number of occurrences of this keyword/value pair.  If the specified pathname is an absolute path (e.g. c:\C21\data\Sample Data\import\sample_data.csv), then the path will be used as is.  If the pathname is relative (e.g. monday\ sample_data.csv), then it is considered to be relative to an "import" folder within the company folder.

Sample Configuration file:

column_list = employeeID, timecardEndDate, workDate, incomeFactorID, hours, pieces, amount, departmentID, glAccountID, job, phase, category, workersCompCode
import_file_path = sample_data.csv

# Lines that are blank or begin with "#" are ignored.
# The timecardEndDate and the workDate must be in YYYYMMDD format.
# DepartmentID is required when company is configured for departmentalization by G/L segment
# White space is not significant
# Keywords are not case sensitive.
# Currently, two keywords are supported. 
# The format of the lines in the file is keyword = value

Data File

Import files must be in either comma-separated-value (csv) or tab-delimited (tab) format and must have a filename extension that matches the format (.csv or .tab).
The employee IDs, pay factors, accounts, and so forth that are in the data file must be configured in the company.

Sample Data file:

1001,20070715, 20070715,Health-Reimbursement,  ,  , 459.77, 2610-00,  ,  ,  ,
1001,20070715, 20070715,Travel,  ,  , 1088.77, 6610-00,  ,  ,  ,
2001,20070715, 20070715,Dep Care-Reimburseme,  ,  ,550.00  ,  2620-00  ,  ,  ,  ,
2002,20070715, 20070715,Hourly,87,  ,  ,6010-00,  ,  ,  ,
2002,20070715, 20070715,Overtime,8 ,  ,  ,6010-00,  ,  ,  ,
3002,20070715, 20070715,Commission,  ,  ,456666.00, 6010-00,  ,  ,  ,         ,

 

Back To Top | Back To C21 Help Index