今すぐお試しください!

製品の詳細Tally PowerShell Cmdlets を確認して、無償評価版をダウンロード:

今すぐダウンロード

PowerShell でTally Data データをCSV に落としてみた

標準PowerShell cmdlets を使ってTally テーブルにアクセス。

CData Cmdlets Module for Tally は、直感的なTally データ連携を提供する標準cmdlet です。 本記事では、Tally 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.
 
 
ダウンロード