diff --git a/File-Formats-toc.html b/File-Formats-toc.html index 21e48d0bc..dc3aa649d 100644 --- a/File-Formats-toc.html +++ b/File-Formats-toc.html @@ -1670,6 +1670,7 @@
  • How to upload a file to Azure blob and download as stream
  • How to set rounded corner for chart in Excel document
  • How to find and replace text in hyperlinks
  • +
  • How to fix the ArgumentOutOfRangeException when accessing a large number of rows and columns?
  • diff --git a/File-Formats/XlsIO/FAQ.md b/File-Formats/XlsIO/FAQ.md index 1ae4bb5a4..b7f8315c7 100644 --- a/File-Formats/XlsIO/FAQ.md +++ b/File-Formats/XlsIO/FAQ.md @@ -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) \ No newline at end of file +* [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) \ No newline at end of file diff --git a/File-Formats/XlsIO/faqs/how-to-fix-the-argument-out-of-range-exception-when-accessing-a-large-number-of-rows-and-columns.md b/File-Formats/XlsIO/faqs/how-to-fix-the-argument-out-of-range-exception-when-accessing-a-large-number-of-rows-and-columns.md new file mode 100644 index 000000000..42219af65 --- /dev/null +++ b/File-Formats/XlsIO/faqs/how-to-fix-the-argument-out-of-range-exception-when-accessing-a-large-number-of-rows-and-columns.md @@ -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 %} \ No newline at end of file