Write to excel without automation (Part 2)

ikik Member Posts: 22
edited 2004-08-05 in NAV Tips & Tricks
FileVendor File
StreamVendor OutStream
recVendor Record Vendor
txtVendor text 250


FileVendor.CREATE('c:\vend.csv');
FileVendor.CREATEOUTSTREAM(streamVendor);
FileVendor.TEXTMODE(TRUE);

IF recVendor.FIND('-') THEN REPEAT
txtVendor := '';
txtVendor := FORMAT(recVendor."No.") + ';';
txtVendor := txtVendor + FORMAT(recVendor.Name) + ';';

// ... and so on ...

StreamVendor.WRITETEXT(txtVendor);
StreamVendor.WRITETEXT();
UNTIL recVendor.NEXT = 0


FileVendor.CLOSE;
HYPERLINK('c:\vend.csv');

PS This method requires conversion of local chars.

Comments

  • PolarPolar Member Posts: 32
    Why don't you use dataport instead?

    It would be much easier, I suppose.... :D
    keep it simple
Sign In or Register to comment.