使用Text :: CSV编写CSV文件是否有单元格长度限制? [英] Is there a cell length limit writing CSV files with Text::CSV?

查看:3505
本文介绍了使用Text :: CSV编写CSV文件是否有单元格长度限制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

链接到此问题
在perl中书写CSV



我使用Text :: CSV解析html文件中的内容并将其写入csv;



但是虽然内容大小超过130000个字符,但它的重叠或只有部分内容被写入单元格。



是在csv中有单元格字符限制范围的任何内容?



请给我一些建议。 / p>

更新



我使用此代码打印csv。
$ csv-> print($ fh,[$ name,$ table]);



如果变量包含字符'[',']',它会重叠到下一个单元格。



更新 b

从此链接
http://open.api.ebay.com/shopping?callname=GetSingleItem&responseencoding=XML&appid=&siteid= 0& version = 839& IncludeSelector =详细资料,说明,ItemSpecifics& ItemID = 251307275303



我试图将内容写入< \Description >

使用Excel时遇到问题。

实际的CSV文件是正确的,但根据 Microsoft的文档,Excel在单个单元格中不能读取超过32767个字符:


一个单元格可以包含的字符:32,767个字符


您可以尝试其他编辑器:





至少其中一个应该为您的需要工作。


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 http://open.api.ebay.com/shopping?callname=GetSingleItem&responseencoding=XML&appid=&siteid=0&version=839&IncludeSelector=Details,Description,ItemSpecifics&ItemID=251307275303

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

解决方案

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:

At least one of them should work for your needs.

这篇关于使用Text :: CSV编写CSV文件是否有单元格长度限制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆