CSV文件打开错误为“已超过最大行数” [英] CSV file opening error as "maximum number of rows has been exceeded "
问题描述
我正在使用Scrapy,我从网页获取数据并尝试将其存储在csv文件中。
I am working on Scrapy, i fetched the data from a web page and trying to stored them in a csv file.
实际上我有 2560
要写入csv文件的数据行。
Actually i had 2560
rows of data to be write to csv file.
当我尝试在OpenOffice中打开文件时,我收到此错误:
When i tried to open the file in OpenOffice, i get this error:
The maximum number of rows has been exceeded. Excess rows were not imported.
我可以打开该文件,但我只能得到 code>删除行和剩余行。
I am able to open the file but i am getting only 600
rows and remaining rows are deleted.
如何获取Scrapy将所有2560行下载到一个csv文件?
How can i get Scrapy to download all the 2560 rows in to one csv file?
推荐答案
看来你的问题只是OpenOffice(或LibreOffice)拒绝加载这么长的.csv。
It appears that your problem is just OpenOffice (or LibreOffice) refusing to load such a long .csv. The data itself should be okay- the remaining rows were simply not imported.
如果您在纯文本编辑器中打开文件(例如 vi
或 nano
),您应该会看到您的所有内容。
If you open up the file in a plain text editor (something like vi
or nano
), you should see that all your content is there.
或者,您可以尝试以下操作:
Alternatively, you can try the following:
$ wc -l file.csv
结果应为2560(表示文件中有2560行)。
The result should be 2560 (indicating that there are 2560 lines in the file).
这篇关于CSV文件打开错误为“已超过最大行数”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!