epam/parso

% formatting ignored when generating CSV

Gagravarr opened this issue · 5 comments

For a column that's percent formatted, eg with something like:

format pctdone percent8.0;
format pctincr percent7.1;

If you convert it with CSVDataWriter you get the raw number like 0.6 or 0.833333333333333 rather than the formatted values like 60% or 83.3%

In this small test sas7bdat file, the percentage formats are applied to the 4th and 5th columns (pctdone and pctincr). SAS Viewer screenshot of the expected values below.

sas-viewer

@Gagravarr Hi, we will fix the formatting of percentage values in the next Parso version. Thank you for the test file. Tell me please, can we use this file for Parso tests in the future?

Yup, it was specifically created for testing, please feel free to use as you wish / as helps!

Thanks!

Was resolved in the recent commit (unfortunately I messed up with issue numbers and put 23 instead of 28).

I've just tried with Apache Tika and a build from github head, and I can confirm the % values are extracting as expected, thanks!

Once there's a new release, I'll bump the Tika dependency to take advantage of the fix.