Recent

Author Topic: FPExporter -> FixedLengthExporter: wrong fixed space(tab)  (Read 1986 times)

Mascarian

  • Newbie
  • Posts: 6
FPExporter -> FixedLengthExporter: wrong fixed space(tab)
« on: November 30, 2018, 04:20:04 pm »
Hello,

While attempting to export data (using FixedLengthExporter) to a fixed length format (Tab separated values), I am encountering an issue when examining the generated file, this issue is an inconsistent (space) length between the values.

Expected behavior is:

Column1 [TAB SPACE] Column2 .... [TAB SPACE] ColumnN      (N being the last column number :| )

However, I am seeing (almost) random spaces (or random number of tab spaces). See attached screen shot for an example.

Any ideas?

Many thanks!

wp

  • Hero Member
  • *****
  • Posts: 11916
Re: FPExporter -> FixedLengthExporter: wrong fixed space(tab)
« Reply #1 on: November 30, 2018, 04:44:31 pm »
If you want TAB-separated values then you need the CSVExporter. In spite of its name (CSV = comma-separated values) you can define the field separator to be a TAB-character by changing the property FormatSettings.FieldDelimiter.

The FixedlengthExporter, on the other hand, would write a file in which the columns have specified widths. Narrower field values are expanded to the requested column width by adding spaces.

Mascarian

  • Newbie
  • Posts: 6
Re: FPExporter -> FixedLengthExporter: wrong fixed space(tab)
« Reply #2 on: November 30, 2018, 05:06:11 pm »
wp,

You sir are definitely a hero. Thank you.

 

TinyPortal © 2005-2018