Wednesday, November 4, 2026

How to Create a Custom Button in TallyPrime Using TDL

How to Create a Custom Button in TallyPrime Using TDL

TallyPrime can be customized with TDL to add buttons, fields, reports and workflow shortcuts. In this example, we add a custom button to the Gateway of Tally.

Version note: Test this code in TallyPrime Developer using a release-compatible TDL environment. Always keep a backup and test with a backup company.

TDL code

;; =========================================================
;; OTS Custom Gateway Button
;; Test in TallyPrime Developer
;; =========================================================

[#Form: Gateway of Tally]
    Add    : Button    : OTS Help Button

[Button: OTS Help Button]
    Title  : "OTS Help"
    Key    : Alt + H
    Action : Display    : OTS Help Report

[Report: OTS Help Report]
    Form   : OTS Help Form
    Title  : "OTS TDL Help"

[Form: OTS Help Form]
    Parts  : OTS Help Part

[Part: OTS Help Part]
    Lines  : OTS Help Line1, OTS Help Line2, OTS Help Line3

[Line: OTS Help Line1]
    Fields : OTS Help Field1

[Line: OTS Help Line2]
    Fields : OTS Help Field2

[Line: OTS Help Line3]
    Fields : OTS Help Field3

[Field: OTS Help Field1]
    Use    : Name Field
    Set As : "Welcome to the custom TDL help screen."
    Width  : 60

[Field: OTS Help Field2]
    Use    : Name Field
    Set As : "Use this area for instructions or support information."
    Width  : 60

[Field: OTS Help Field3]
    Use    : Name Field
    Set As : "Press Esc to return to the Gateway of Tally."
    Width  : 60

How the code works

  • The Gateway of Tally form is extended with a new button.
  • Alt + H opens the custom report.
  • The report uses a separate form, part, lines and fields.
  • Unique names beginning with OTS help prevent conflicts with other TDL files.

How to load the TDL

  1. Open TallyPrime Developer.
  2. Create a new TDL file.
  3. Paste the complete code.
  4. Compile or load the file in a test company.
  5. Open the Gateway of Tally.
  6. Select OTS Help or press Alt + H.
  7. Press Esc to return.

Safe testing checklist

Test the button after opening different companies and after loading other custom TDL files. Confirm that the shortcut does not replace an existing important key. Keep the default TallyPrime screens available, and do not test custom code directly on live company data.

Troubleshooting

  • Button does not appear: Confirm that the TDL loaded successfully and that the active form is Gateway of Tally.
  • Shortcut does not work: Check whether another TDL or TallyPrime function already uses Alt + H.
  • Report opens blank: Verify the report, form, part, line and field names.
  • Errors appear after an upgrade: Compare the code with the TDL definitions supported by your TallyPrime release.

Conclusion

A small custom button is a useful starting point for TDL customization. After testing this example, you can connect the button to a custom report, dashboard, calculator or business workflow. Keep each customization in a separate file and maintain a tested backup version.

Monday, October 26, 2026

How to Export TallyPrime Reports to Excel: Complete Guide

Version note: This guide is for TallyPrime Release 7.0 onwards. Menu names may vary slightly in other releases.

Before you export
Take a verified backup and protect exported files because they may contain confidential financial information.

Why export TallyPrime data to Excel?

Excel exports are useful for management review, reconciliation, budgeting, filtering, pivot tables and business analysis. TallyPrime supports exporting reports, vouchers, masters and transactions in Excel and other formats.

Export a report to Excel

  1. Open the required report, such as Day Book, Ledger, Trial Balance, Stock Summary, Profit and Loss or Balance Sheet.
  2. Set the required period using Alt+F2.
  3. Apply filters or drill down to the required level.
  4. Press Ctrl+E to open the Current export screen.
  5. Select Configure and set File Format to Excel.
  6. Choose the folder and file name.
  7. Review the report details and select Send or press E.

Open the exported file in Microsoft Excel for filtering, sorting, formulas, charts or pivot-table analysis.

Export a Day Book or individual voucher

  1. Press Alt+G and open Day Book.
  2. Set the required date range.
  3. Select a voucher and press Enter if you need to inspect it.
  4. Press Ctrl+E, select Configure and choose Excel.
  5. Select the required details and export the file.

To export one invoice or voucher, open that voucher before pressing Ctrl+E.

Export masters or transactions

For masters, open Chart of Accounts or the required master report, use Alt+F12 when you need a range, press Alt+E, select Current, configure the master type and export format, then send the file.

For transactions, open Day Book, set the period, press Alt+E, select Current, configure voucher type and narration options, choose Excel and export.

For migration or system-to-system exchange, XML or JSON may be more suitable than Excel. Excel is generally better for review and analysis.

Prepare the exported Excel file

  • Check the company name and reporting period.
  • Convert the data range into an Excel Table.
  • Freeze the heading row and apply filters.
  • Format dates consistently.
  • Check that debit and credit columns are numeric.
  • Keep a separate notes sheet for observations.

Useful analysis includes monthly sales, customer outstanding balances, GST summaries, item-wise quantity, expense analysis and purchase-versus-sales comparisons.

Common export problems

  • File is not created: check the destination folder and write permission.
  • File is already open: close Excel and export again.
  • Export fails: try a new file name and another destination folder.
  • File is blank: confirm the report period and filters.
  • Numbers appear as text: use Excel's Convert to Number option and check for extra spaces.
  • Report is too large: export a shorter date range or export month by month.

Privacy and safety checklist

  • Remove unnecessary personal, customer and bank details before sharing.
  • Keep a protected original export.
  • Do not upload confidential accounting files to unknown online tools.
  • Clearly mention the period covered by the file.

For official details, read TallyHelp: Export Data in TallyPrime.

Related TallyPrime guides

Conclusion

Exporting TallyPrime reports to Excel is useful for review, reconciliation and management analysis. Always select the correct period, verify the totals, protect confidential information and keep the original TallyPrime data unchanged.