Menu

Home

Excel to Tally using PHP - Import Items
This code illustrates how to read data from Excel sheet and import it into Tally Software for free without using any third party tools or software.

Excel data
The Excel sheet that we have used in this sample contains ITEM Masters. The sheet format is as follows :

Item_Name BaseUnits

Piston Nos
O Ring Nos
Bush Nos

As you can see, there are two columns. The first contains the Item names and the second contains the Unit. In this sample code, we create two Masters. First we create UNIT Master and then STOCKITEM master for each row in the Excel sheet. If you see the code you will find TALLYMESSAGE tag appearing twice for each row in the Excel sheet.

Import data from Excel to Tally

Copy the files into a folder within www folder and then open the folloiwng URL in a browser

localhost://myfolder/excel-to-tally-import-items.php

We use PHPExcelReader class to read the Excel data and PHP Curl to post it into Tally ERP 9.

The Excel data is read and converted into XML. It is then posted to Tally automatically without any manual intervention. This is done using HTTP POST request on Port 9000. If there is any error, the same is returned by Tally software.

PS:
1. You must ensure that the Port Number in Tally and the Port Number in PHP code is same.
2. The Port Number is Tally can be set / changed using F12 key.

You can view the Items created in Tally ERP 9 using the following option:
Gateway of Tally > Inventory Info >> StockItem > Display

Read all about Excel to Tally at : https://udimagic.in


Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.