Hello, I'm currently trying to export a datatable to excel using the example https://support.syncfusion.com/kb/article/8133/export-datatable-to-excel-with-formatting-in-c-vb-net
but when I try to execute the funcion it gives me the error
System.FormatException: 'Index (zero based) must be greater than or equal to zero and less than the size of the argument list.'
Here's the code:
The shared code snippet looks fine. We suspect there might be an issue with the data in the data table. We request you to share an issue reproducing sample to investigate the query further.
Thanks for the response, I found the problem.
I was using string.Format() in another line and I was not passing an argument so it returned the index zero based error. The sfdatagrid, excel converter and datatable were fine.
Alejo, we are glad that the issue is resolved at your end. Please get back to us if you need any further assistance.