今すぐお試しください!

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

今すぐダウンロード

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

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

CData Cmdlets Module for Zoho Books は、直感的なZoho Books データ連携を提供する標準cmdlet です。 本記事では、ZohoBooks Cmdlets を使ったサンプルを提供します。

Creating a Connection to Your Zoho Books Data

Zoho Books uses the OAuth authentication standard. To authenticate using OAuth, create an app to obtain the OAuthClientId, OAuthClientSecret, and CallbackURL connection properties. See the OAuth section of the Getting Started guide in the Help documentation for an authentication guide.

$conn = Connect-ZohoBooks  -OAuthClientId "$OAuthClientId" -OAuthClientSecret "$OAuthClientSecret" -CallbackURL "$CallbackURL" -OrganizationId "$OrganizationId"

Selecting Data

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

Select-ZohoBooks -Connection $conn -Table INVOICES | Select -Property * -ExcludeProperty Connection,Table,Columns | Export-Csv -Path c:\myINVOICESData.csv -NoTypeInformation

You will notice that we piped the results from Select-ZohoBooks 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.
 
 
ダウンロード