CreateCSV

Methode (Function) · gibt Boolean zurück

CreateCSV ist eine Methode der Klasse Aloaha_ZUGFeRD.XML im Aloaha ZUGFeRD SDK.

Beschreibung (Originaltext der englischen SDK-Dokumentation): Exports the current invoice into five CSV data sets: seller, buyer, line items, totals and document level allowances/charges (format as used by ImportCSV; see ReadTradeItemCSV, ReadTotalsCSV, ReadTradeAllowanceChargesCSV).

Rückgabe: Always False (the internal result is not returned). Check the path arguments or the written files for the generated data.

Hinweis: Files are written as UTF-8. A data set that is empty is neither written nor returned.

Deklaration

Public Function CreateCSV(Optional ByRef SellerPath As String = "", Optional ByRef BuyerPath As String = "", Optional ByRef ItemsPath As String = "", Optional ByRef TotalsPath As String = "", Optional ByRef AllowancesPath As String = "", Optional ByVal DoOverWriteFiles As Boolean = False, Optional ByVal Seperator_Char As String = ",") As Boolean

Parameter

NameTypPflichtBeschreibung
SellerPathStringoptional (Standard: "")Target file for the seller CSV. If it is not a file path (no \ or no .), it receives the CSV text instead (input/output)
BuyerPathStringoptional (Standard: "")Target file for the buyer CSV, or receives the CSV text (input/output)
ItemsPathStringoptional (Standard: "")Target file for the line items CSV, or receives the CSV text (input/output)
TotalsPathStringoptional (Standard: "")Target file for the totals CSV, or receives the CSV text (input/output)
AllowancesPathStringoptional (Standard: "")Target file for the allowances/charges CSV, or receives the CSV text (input/output)
DoOverWriteFilesBooleanoptional (Standard: False)True deletes existing target files (paths containing \) before writing. Existing files are overwritten in either case
Seperator_CharStringoptional (Standard: ")Column separator; empty or Nothing uses a comma

Aufruf (VB.NET)

Dim alo As New Aloaha_ZUGFeRD.XML(Aloaha_ZUGFeRD.iXML.ZUGFeRDProfile.comfort, False, "IHR-LIZENZSCHLUESSEL")
If Not alo.CreateCSV() Then
    Console.WriteLine("Fehler: " & alo.Last_Error)
End If

Aufruf (C#)

var alo = new Aloaha_ZUGFeRD.XML(Aloaha_ZUGFeRD.iXML.ZUGFeRDProfile.comfort, false, "IHR-LIZENZSCHLUESSEL");
string sellerPath = "";
string buyerPath = "";
string itemsPath = "";
string totalsPath = "";
string allowancesPath = "";
if (!alo.CreateCSV(ref sellerPath, ref buyerPath, ref itemsPath, ref totalsPath, ref allowancesPath))
{
    Console.WriteLine("Fehler: " + alo.Last_Error);
}

Artikel mit CreateCSV

COM-Schnittstelle

CreateCSV ist Mitglied der Schnittstelle Aloaha_ZUGFeRD.iXML (Position 234 von 343) und damit auch aus VB6, VBA/Access und anderen COM-Clients über CreateObject("Aloaha_ZUGFeRD.XML") aufrufbar. Neue Mitglieder werden immer am Ende von iXML angefügt, damit bestehende COM-Clients unverändert weiterlaufen; nach einem Update die Typbibliothek neu registrieren.

Quelle: XML-Dokumentationskommentare des Aloaha ZUGFeRD SDK (xml.vb). Gleiche Signatur in VB6/VBA über COM. In C# werden ByRef-Parameter mit ref übergeben, VB-Eigenschaften mit Parametern heißen get_…/set_…, optionale Parameter können entfallen.