I am in the process of evaluating Aspose.Cells and ran in to few issues that I have listed below. Please clarify.
1. I am using WorkbookDesigner class for generating an Excel file. Aspose markers are predefined in an Excel file. When a datatable/Dataset(with some data) is assigned as a datasource, Excel is generated fine with some rows populated in it. This piece is working good.
However When the datatable/Dataset(with no data) is assigned as a datasource, Excel file is generated with markers showing on the report. I am using WorkbookDesigner.SetDataSource(dtDataTable). dtDataTable does not contain any rows. I would expect the excel to be generated without any markers in it.
2. Is there any default row/ column alignements when WorkbookDesigner.SetDataSource is used. I see that some columns are left aligned and some columns are right aligned.
FYI..I have used the below code for both of the above issues.
Dim oWorkbookDesigner As WorkbookDesigner = New WorkbookDesigner
oWorkbookDesigner.Workbook = New Workbook(Path.Combine(Lookup.GetFilePath(Enums.PathName.ExcelDocumentTemplates, Date.Now), strTemplateFileName))
If dsDataSource IsNot Nothing AndAlso dsDataSource.Tables.Count > 0 Then
For Each dtDataTable As DataTable In dsDataSource.Tables
oWorkbookDesigner.SetDataSource(dtDataTable)
Next
oWorkbookDesigner.Process(True)
oWorkbookDesigner.Workbook.Save(strOutPutPath)
End If
oWorkbookDesigner = Nothing
If eSaveDocType = Enums.SaveDocumentType.Display Then
CommonUIUtils.OpenPreDefinedExtensionFile(strOutPutPath)
End If