ImportCSV
Methode (Function) · gibt Boolean zurück
ImportCSV ist eine Methode der Klasse Aloaha_ZUGFeRD.XML im Aloaha ZUGFeRD SDK.
Beschreibung (Originaltext der englischen SDK-Dokumentation): Creates a new invoice from CSV data (seller, buyer, line items, totals, allowances/charges and optional ship-to / ship-from parties), e.g. as produced by CreateCSV. The invoice is created as XRechnung/EN 16931 (xInvoice); missing currency defaults to EUR, missing or "today" invoice date to the current date, missing type to 380.
Rückgabe: True once the CSV importer has been created, even if a later import step fails; False if the importer could not be created.
Hinweis: Optional totals columns GenericInfo, PriceConditions, GenericComment, RegulatoryInformation, LegalInformation, TAXInformation and CustomsInformation are added as invoice notes with subject codes AAI, AAK, SUR, REG, ABL, TXD and CUS. If no business process is given, urn:fdc:peppol.eu:2017:poacc:billing:01:1.0 is used. After import the XML is set to be saved without UTF-8 header and without ASCII conversion.
Deklaration
Public Function ImportCSV(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 SeperatorChar As String = ",", Optional ByVal ImportCharacterSet As String = "", Optional ByVal deliverto As String = "", Optional ByVal deliverfrom As String = "") As Boolean
Parameter
| Name | Typ | Pflicht | Beschreibung |
|---|---|---|---|
SellerPath | String | optional (Standard: "") | Seller CSV |
BuyerPath | String | optional (Standard: "") | Buyer CSV |
ItemsPath | String | optional (Standard: "") | Line items CSV |
TotalsPath | String | optional (Standard: "") | Totals / header CSV (currency, invoiceid, invoicedate, type, leitwegid, notes, BusinessProcessSpecifiedDocumentContextParameter, ...) |
AllowancesPath | String | optional (Standard: "") | Document level allowances/charges CSV |
SeperatorChar | String | optional (Standard: ") | Column separator (default comma) |
ImportCharacterSet | String | optional (Standard: "") | Character set of the CSV data; empty uses utf8 |
deliverto | String | optional (Standard: "") | Ship-to party CSV (optional) |
deliverfrom | String | optional (Standard: "") | Ship-from party CSV (optional) |
Aufruf (VB.NET)
Dim alo As New Aloaha_ZUGFeRD.XML(Aloaha_ZUGFeRD.iXML.ZUGFeRDProfile.comfort, False, "IHR-LIZENZSCHLUESSEL")
If Not alo.ImportCSV() Then
Console.WriteLine("Fehler: " & alo.Last_Error)
End If
Aufruf (C#)
var zfStandard = Aloaha_ZUGFeRD.iXML.ZUGFeRDVersion.xInvoice; // Optional ByRef im Konstruktor: in C# mit ref übergeben
var alo = new Aloaha_ZUGFeRD.XML(Aloaha_ZUGFeRD.iXML.ZUGFeRDProfile.comfort, false, "IHR-LIZENZSCHLUESSEL", ref zfStandard);
string sellerPath = "";
string buyerPath = "";
string itemsPath = "";
string totalsPath = "";
string allowancesPath = "";
if (!alo.ImportCSV(ref sellerPath, ref buyerPath, ref itemsPath, ref totalsPath, ref allowancesPath))
{
Console.WriteLine("Fehler: " + alo.Last_Error);
}
Artikel mit ImportCSV
COM-Schnittstelle
ImportCSV ist Mitglied der Schnittstelle Aloaha_ZUGFeRD.iXML (Position 174 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.