Hi Guys,
I am Asif. We have a client for whom we are working for this Asp.net web form project. We have selcted SyncFusion SDK for excel formatting import/export feature. We are facing a problem while with the SDK.
If we add a simple Cell text using the following line, it is working good.
sheet.Range["B2"].Text = "Group Code ";
If we add a table with the above line right below of B2, the table does added but B2 cell becomes empty. Can you please let us know what we are making a mistake? Here is the code.
IApplication application = excelEngine.Excel;
application.DefaultVersion = ExcelVersion.Xlsx;
IWorkbook workbook = application.Workbooks.Create(1);
IWorksheet sheet = workbook.Worksheets[0];
DataTable dataTable = setData();
sheet.ImportDataTable(dataTable, 4, 2, true, true);
sheet.Range["B2"].Text = "Group Code "; // become empty with data table
sheet.Range["C2"].Text = EventGroupName;
// become empty with data table
sheet.UsedRange.AutofitColumns();
workbook.SaveAs(excelStream);
excelStream.Dispose();
Your guidance will be highly appreciated.
Thank you.
Asif.