"Maximum column number is 255" error occurs when npoi exports an Excel file"

Source: Internet
Author: User

This error is not an npoi problem, but an Excel problem. The reason is that the maximum column in Excel is 255, so this problem occurs when the exported column exceeds 255.

But excel2007 and above do not have this problem, because more than 2007 columns have been added to 16384 columns, but the Code of 2003 and 2007 is different.

Npoi Operation 2007 (npoi 2.0): http://tonyqus.sinaapp.com/npoi2tutorial

 

How to solve this problem

1. Use 2003 to limit the number of columns to 255,

2. You can use 2007 columns to expand to 16384, but the previous code is 2003, so the code is changed to 2007.

 

Excel2003 restrictions see: http://office.microsoft.com/zh-cn/excel-help/HP005199291.aspx

Excel2007 restrictions see: http://office.microsoft.com/zh-cn/excel-help/HP010073849.aspx

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.