Posts

Showing posts with the label CSV file generation

Create a zipped file using x++

 This article explains how we can create a zipped file in x++ and allow the file to be downloaded using the browser download. For this example, I am adding a csv file to a zipped archive. First we will need to create a stream with the contents for the csv file. CommaStreamIo streamIO = CommaStreamIo::constructForWrite();   streamIO.writeExp('Id', 'Title'); // These will represent the header of the csv file  streamIO.writeExp('001', 'Science'); // Row 1 streamIO.writeExp('002', 'Nature'); // Row 2 Next, we can generate the csv file contents and add it to a zip archive. // Get the stream System.IO.Stream        stream              = streamIO.getStream(); const str               extensionCsv        = '.csv'; c...