hi…
I already created exporter data to excel
but how how i merge cell A and B
for example cell A → Item No,
cell B → null
but i want to merge cell A and B to fill Item No.
and how to add table in that exported excel
thanks
hi…
I already created exporter data to excel
but how how i merge cell A and B
for example cell A → Item No,
cell B → null
but i want to merge cell A and B to fill Item No.
and how to add table in that exported excel
thanks
Open Excel. Turn on the Macro editor. Merge two cells. Turn the macro editor off. Open the macro editor and look at the code that was generated. Use that to expand your C/AL code.
did you mean this
Sub Macro1()
Range(“A3:B3”).Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Selection.Merge
End Sub
That’s right. So now you look at that code and you try to figure out which statement in there does the actual merging. First, it selects a range, and then it issues a ‘Merge’ command on that selection. All that stuff inside the ‘With Selection’ statement I think you can ignore, it looks like that is mostly formatting. Now go into the object designer in NAV and look for the ‘Excel Buffer’ table. In there you will find examples of how to create a selection in C/AL code. Use that knowledge and go from there.