Handle any CSV file with the CSV Buffer in AL and Business Central

preview_player
Показать описание
(*) And yes, CSV is hard to pronounce, so sometimes it comes out as CVS :)

Рекомендации по теме
Комментарии
Автор

3 years on and still solving problems! I just used this technique to import some data that required special processing.

streichersit
Автор

Fist of all thank you for your great work! I just wanted to add some comment to help your channel and second is that I am new to BC and I strogeld to find how to sal the TAB as separator because the parameter only accepts text[1]. So here is the trick I used: take a variable as Char (tabChar) and then assigne the value 9 (tabChar := 9) to it and than a format this for the precedure (format(tabChar))

tamassoltesz
Автор

Hey, in addition to that now there is a InStream; CSVFieldSeparator: Text[1]; CSVCharactersToTrim: Text) - this will automatically trim characters like " during the loading process

DmitryKatson
Автор

Question, my CSV is different to yours in a way that it could only contain 1 SH but also multiple (seperate SL's). What i am looking for is to check if the SH already exists, and if so add the lines to the existing SH, but if it doesn't then create a new SH, i couldn't find a video about this on your account.

dyongrob
Автор

Has anyone ever reported the bug in AL when using the CSV Buffer where a field with a comma in it like the number "10, 000", will get processed as 2 fields.... 10 and 000. Microsoft has added a CharactersToTrim parameter since this video was created so that you can ask the CSV Buffer to remove double quotes but they process the characterToTrim after they've populated the value in the CSV Buffer.

YannSaintLaurent
Автор

Procedure WriteToStream has two parameters (5:59) . Then, where the variable GetNumberOfColumns came from? Thx

miljanamladenovic
Автор

Hi Erik
An alternative to the CSV Buffer could be using the List of ]Text] then you don't have the limitation of the length (Text[250])

var
InStream: InStream;
RecordText: Text;
FieldList: List of [Text];

while not (InStream.EOS) do begin
Clear(FieldList);

FieldList := RecordText.Split(';');
// You will get a dynamic array with all values for each line

end;

i would suggest that you could make a similar video :)

janholstbakkensen
Автор

How do we handle text qualifiers that are present within the CSV file in cases where we don't have an option to dictate/change the delimiters? As an example: "My Company, LLC", "Smith, John"

tonyhaines
Автор

As a newbie to this AL world, this was very helpful. Just wondering if you could give any insight to handling this same
type of import but with 2 files (1 header, 1 detail lines). Here is my thinking...
1) Process Header Lines
2) Process Detail Lines

??

scottsteffen
Автор

Hi Erik,
Big thanx for all your wonderful videos - really helping me getting into the Cloud World of BC!
Could the Import of CSV be done without dialog.
My customer has 4 csv files updated daily from their Vendor - and need them imported automatically every morning without user doing anything.

Is it possible without using Azure - just using AL?

henrikfrederiksen
Автор

Which extension is that lets you click on a .app and shows you the objects in it and opens also the object? 😮 You did that around 4:18. PS I didn't even know that there was also a CSV buffer...😓

alainkrikilion
Автор

Hi Erik
I am new in AL, there is any book for me for learning step by step all the things

madhavadhatrao
Автор

hi, in the guthub, i cannot find the source code for the table CSV Buffer, only for the Page...

blutkraehe_official
Автор

Can do video of csv buffer export it would be great help 👍

weixiangow