The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
// Here I use a public variable named Table that is already filled with a datatable when it reaches this step
private void excelExportBtn_Click(object sender, EventArgs e)
{
string path = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments).ToString();
string fileName = string.Format("{0}.xlsx", NombreTabla);
KKKonduru Keerthi Konduru Ravichandra Raju Syncfusion Team April 27, 2023 12:45 PM UTC
Hi Alejo,
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.
Regards,
Keerthi.
AYAlejo YanczukApril 27, 2023 01:24 PM UTC
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.
Marked as answer
KKKonduru Keerthi Konduru Ravichandra Raju Syncfusion Team May 1, 2023 06:05 AM UTC
Alejo, we are glad that the issue is resolved at your end.
Please get back to us if you need any further assistance.