gc-excelviewer icon indicating copy to clipboard operation
gc-excelviewer copied to clipboard

[Feature Requests] Column Formatting

Open vmacs opened this issue 6 years ago • 3 comments

Great job with the Excel Viewer and CSV preview! It is very handy. You would make my day if you are able to add these enhancements:

  • Files with leading zeros are being shown as numbers without the leading zeros.
  • Numbers that are not quantitative but just identifiers are showing with commas. I'd like to see a way to treat numbered columns as text.
  • Would be great if date columns could filter somewhat like Excel does by dates, such as filter by year, month, and/or day.
  • Along those lines, if possible, an enhancement beyond what Excel does to allow filtering on the day of the week of a date would be simply fantastic (i.e. all Mondays in the list).
  • Lastly, it would really help to have a way to set Excel Viewer to treat the entire file as text, exactly as entered with no manipulation.

Thanks for considering these ideas and thanks for your hard work with this extension.

vmacs avatar May 30 '18 02:05 vmacs

Beware about the first point. There are alphanumeric codes that are made up of digits only and start with zeros but do not express a numeric value. Automatically converting these alphanumeric codes into numbers (as Excel does by default) for me is the wrong choice that can lead to errors in the use of this very useful extension.

ElCondor1969 avatar Jun 02 '18 06:06 ElCondor1969

@vmacs Version 2.1.23 addresses some of your issues. The default for numeric formatting was changed to eliminate thousands separators. There is also a new setting (csv-preview.formatValues) that you can set to false to bypass numeric formatting altogether. See the changelog for details.

Being able to recognize dates is a good candidate for a future release. There would need to be a setting for specifying the format to use for parsing dates, as the contents of the file may not match the locale.

jjuback avatar Jun 20 '18 19:06 jjuback

@vmacs Version 2.1.27 changed the semantics of the csv-preview.formatValues setting. See the changelog for details.

jjuback avatar Jan 28 '19 15:01 jjuback