Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions File-Formats-toc.html
Original file line number Diff line number Diff line change
Expand Up @@ -1670,6 +1670,7 @@
<li><a href="/file-formats/xlsio/faqs/how-to-upload-a-file-to-azure-blob-and-download-as-stream">How to upload a file to Azure blob and download as stream</a></li>
<li><a href="/file-formats/xlsio/faqs/how-to-set-rounded-corner-for-chart-in-excel-document">How to set rounded corner for chart in Excel document</a></li>
<li><a href="/file-formats/xlsio/faqs/how-to-find-and-replace-text-in-hyperlinks">How to find and replace text in hyperlinks</a></li>
<li><a href="/file-formats/xlsio/faqs/how-to-fix-the-argument-out-of-range-exception-when-accessing-a-large-number-of-rows-and-columns">How to fix the ArgumentOutOfRangeException when accessing a large number of rows and columns?</a></li>
</ul>
</li>
</ul>
Expand Down
3 changes: 2 additions & 1 deletion File-Formats/XlsIO/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,5 @@ The frequently asked questions in Essential XlsIO are listed below.
* [Why cone chart shows itself as column or bar chart?](faqs/why-cone-chart-shows-itself-as-colum-or-bar-chart)
* [How to vary colors by point for line and column chart?](faqs/how-to-vary-colors-by-point-for-line-and-column-chart)
* [How to upload a file to Azure blob and download as stream?](faqs/how-to-upload-a-file-to-azure-blob-and-download-as-stream)
* [How to find and replace text in hyperlinks](faqs/how-to-find-and-replace-text-in-hyperlinks)
* [How to find and replace text in hyperlinks](faqs/how-to-find-and-replace-text-in-hyperlinks)
* [How to fix the ArgumentOutOfRangeException when accessing a large number of rows and columns?](faqs/how-to-fix-the-argument-out-of-range-exception-when-accessing-a-large-number-of-rows-and-columns)
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
title: Fix the ArgumentOutOfRangeException when accessing a large number of rows and columns.
description: This page helps how to fix the ArgumentOutOfRangeException when accessing a large number of rows and columns in Syncfusion .NET Excel library (XlsIO).
platform: file-formats
control: XlsIO
documentation: UG
---

# How to fix the ArgumentOutOfRangeException when accessing a large number of rows and columns?

By default, when creating a new workbook, it is set to Excel97to2003 version which supports only 65536 rows and 256 columns. When the row and column index exceeds this limit, an ArgumentOutOfRange exception is thrown. To fix this, the [DefaultVersion](https://help.syncfusion.com/cr/file-formats/Syncfusion.XlsIO.IApplication.html#Syncfusion_XlsIO_IApplication_DefaultVersion) needs to be set as [Xlsx](https://help.syncfusion.com/cr/file-formats/Syncfusion.XlsIO.ExcelVersion.html). This version supports 1048576 rows and 16384 columns.

The following code snippet shows how to set the default version of IApplication to Xlsx.

{% tabs %}
{% highlight c# tabtitle="C# [Cross-platform]" %}
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
{% endhighlight %}

{% highlight c# tabtitle="C# [Windows-specific]" %}
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
{% endhighlight %}

{% highlight vb.net tabtitle="VB.NET [Windows-specific]" %}
IApplication application = excelEngine.Excel
application.DefaultVersion = ExcelVersion.Xlsx
{% endhighlight %}
{% endtabs %}