Smart marker group and skip skips too many rows

For example, I want to skip a row every time a new start date is encountered:
&=rowdata.start_date(group:repeat,skip:1)

This works as expected until after the final row of data, an extra blank row is inserted for each record in the dataset.

Any ideas?

I should note, I have gotten this to work as expected on other spreadsheets and I can’t see any difference in implementation between the two.

Hi,

I’d like to request you to share with us the file you’re using. Also, if possible, can you send us the sample code. This would help us a lot to investigate the problem.


I first encountered this issue last year and at the time the
users were able to live with the problem. Since then, they have
requested that it be fixed so I am revisiting it. I put together a simple sample to illustrate
the problem. The code is below. I attached the template and the resulting Excel file. Notice the
11 blank rows after the last row of “data.” The blank rows are always
at the bottom of the data. The number of blank rows changes depending on
the dataset.


'Prompt the user where to save the file
Dim dialog As New SaveFileDialog
dialog.FileName = “Test.xlsx”
dialog.Filter = “Excel (.xlsx) |.xlsx;”
Dim result As DialogResult = dialog.ShowDialog
'Check to make sure the user didn’t click cancel.
If result = Windows.Forms.DialogResult.OK Then
Me.Cursor = Cursors.WaitCursor

’ Get Report Data
Dim dsReportRows As New DataSet
Dim sTemplatePath As String

’ Get Template file
sTemplatePath = “c:\test_template.xlsx”

’ Initialize Aspose Cells
Utility.GetAsposeLicenses()

’ Create, Define and Open Excel Template
Dim oWD As WorkbookDesigner = New WorkbookDesigner
'Dim oWS As Worksheet = oWD.Workbook.Worksheets(0)
oWD.Open(sTemplatePath)


dsReportRows.Tables.Add(“rowdata”)
dsReportRows.Tables(“rowdata”).Columns.Add(“col1”)
Dim r As DataRow
For i As Integer = 0 To 5
r = dsReportRows.Tables(“rowdata”).NewRow()
r(“col1”) = “X”
dsReportRows.Tables(“rowdata”).Rows.Add®
Next
For i As Integer = 0 To 5
r = dsReportRows.Tables(“rowdata”).NewRow()
r(“col1”) = “Y”
dsReportRows.Tables(“rowdata”).Rows.Add®
Next
For i As Integer = 0 To 5
r = dsReportRows.Tables(“rowdata”).NewRow()
r(“col1”) = “Z”
dsReportRows.Tables(“rowdata”).Rows.Add®
Next

'Bind the data by row
oWD.SetDataSource(dsReportRows.Tables(“rowdata”))
oWD.Process(True)


'Save the doc and prompt to open
SaveExcel(oWD, dialog)

Me.Cursor = Cursors.Default

End If



Private Function SaveExcel(ByVal oWD As WorkbookDesigner, ByVal dialog As SaveFileDialog) As Boolean
Try
oWD.Workbook.Save(dialog.FileName, FileFormatType.Excel2007Xlsx)

If MsgBox(“Excel Report Created. Open Report?”, MsgBoxStyle.YesNo, “Open Report?”) = MsgBoxResult.Yes Then
System.Diagnostics.Process.Start(dialog.FileName)
End If
'MsgBox(“Excel Report created”)
Catch ex As Exception
MsgBox(“Unable to save Excel file. If the file exists be sure it is not already open and try again.”)
End Try

Return True
End Function

Hi,

Thanks for reporting it.

Can you please test your case with our latest version Aspose.Cells for .NET 5.2.2.1 and let us know your findings.

I was able to try the same test with the latest (5.2.2.1) version and the results are identical.

Hi,

Thanks for testing this issue. This issue has been logged as CELLSNET-24245.

Hi Aw,

Yes, this issue has been logged as a bug. And our development team will fix it. Kindly give us a week or two. You can monitor the bug status from the upper left corner of this thread. At the moment, it shows a bug id, but when it will be resolved, it will also show you the word resolved.

Also, we will post here to notify you once the issue will be resolved.

Hi,

Please try the attached version. We have fixed your issue you posted here.

Thank you.

The issues you have found earlier (filed as 24245) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.