Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a cell length limit writing CSV files with Text::CSV?

Tags:

csv

perl

Linking to this question Writing CSV in perl

I am parsing a content from html file and writing it in csv by using Text::CSV; which was working well.

But while the content size had over 130000+ characters, its getting overlapped or only partial content is written in the cell.

is that anything with the cell character limit range in a csv ?

Please give me some suggestion.

Update

i use this code to print the csv. $csv->print($fh, [$name, $table]);

if the variable contains character '[',']' it get overlapped to next cells.

Update

From this link

I am trying to write the content inside the <\Description> Tag which have a large content.

like image 995
Balakumar Avatar asked Sep 17 '13 06:09

Balakumar


1 Answers

The problem was with Excel. The actual CSV file is correct, but according to Microsoft's documentation, Excel cannot read more than 32767 characters in a single cell:

Total number of characters that a cell can contain: 32,767 characters

You could try other editors like:

  • Notepad++
  • UltraEdit
  • CSVed

At least one of them should work for your needs.

like image 168
Sundar R Avatar answered Sep 23 '22 11:09

Sundar R