How to pipe Tally Data to CSV in PowerShell



Use standard PowerShell cmdlets to access Tally tables.

The CData Cmdlets Module for Tally is a standard PowerShell module offering straightforward integration with Tally. Below, you will find examples of using our Tally Cmdlets with native PowerShell cmdlets.

Creating a Connection to Your Tally Data

Set the following connection properties to connect to Tally Instance:

  • Url: Set this to the URL for your Tally instance. For example: http://localhost:9000.

$conn = Connect-Tally  -Url "$Url"

Selecting Data

Follow the steps below to retrieve data from the Company table and pipe the result into to a CSV file:

Select-Tally -Connection $conn -Table Company | Select -Property * -ExcludeProperty Connection,Table,Columns | Export-Csv -Path c:\myCompanyData.csv -NoTypeInformation

You will notice that we piped the results from Select-Tally into a Select-Object cmdlet and excluded some properties before piping them into an Export-Csv cmdlet. We do this because the CData Cmdlets append Connection, Table, and Columns information onto each "row" in the result set, and we do not necessarily want that information in our CSV file.

The Connection, Table, and Columns are appended to the results in order to facilitate piping results from one of the CData Cmdlets directly into another one.

Ready to get started?

Download a free trial of the Tally Cmdlets to get started:

 Download Now

Learn more:

Tally Icon Tally Data Cmdlets

An easy-to-use set of PowerShell Cmdlets offering real-time access to Tally. The Cmdlets allow users to query live data - just like working with SQL server.