bskinn / excel-csvexporter

Lightweight tool to export ranges within an Excel sheet to CSV
MIT License
41 stars 7 forks source link

Crop the end of long texts #36

Closed balintrichly closed 2 years ago

balintrichly commented 2 years ago

I exported a selection with long text values in the fields, but after 256 characters the end of the text has been truncated for each field.

bskinn commented 2 years ago

Hmm, interesting. To be sure I understand: is it truncating each cell to 256 characters? Or is it truncating each row to 256?

Could you attach a sample Excel sheet here that shows the behavior, so that I have something to test with?

balintrichly commented 2 years ago

Each cell to 256 characters. Here is an example sheet with the first 200 numbers comma separated. I exported only the A1 cell with pipe separation and it happend again, after 88, no more character exported. I also attached the output csv file.

first200number.csv first200number.xlsx

bskinn commented 2 years ago

Interesting. I'm using VBA's Format function to apply the number format specified on the GUI, and it apparently truncates its output to 255 characters. I believe I have a fix in place; I'll test it for a bit and then release a new version, and we'll see if it fixes this problem. Stay tuned....

bskinn commented 2 years ago

Ok, give v1.2.2 a shot, see if it works correctly for you: https://github.com/bskinn/excel-csvexporter/releases/tag/v1.2.2

balintrichly commented 2 years ago

It seems to work now, thanks for your fast feedback and for the correction.