OmnisXL / ExcelFormat : formatting cells after $populatewithlist

Nick Renders omnis1 at
Fri Jan 26 04:29:20 EST 2018

Hi List,

I am playing around with Artsman's ExcelFormat external and I have hit a 
little snag.

Basically, what I would like to do is save an Omnis list as an Excel 
file and set the
row height and text wrap properties for all cells. So my code looks like 


Do lXLSBook.$initialize(kXLxlsx)

Do lXLSBook.$addformat() Returns lXLSFormat
Do lXLSFormat.$wrap.$assign(kTrue)
Do lXLSFormat.$bordertop.$assign(kXLBorderStyleDouble)     ;; ** purely 
to visualize the issue

Do lXLSBook.$populatewithlist(lList)

Do lXLSBook.$getsheet(1) Returns lXLSSheet
For lList.$line from 1 to lList.$linecount step 1
	Do lXLSSheet.$setrow(lList.$line,20,lXLSFormat)
End For

Do lXLSBook.$save(lPath)


The resulting Excel file has all rows with height 20, but the lXLSFormat 
is only
applied to the cells that come after my imported list. So if lList has 3 
only column D and beyond have text wrap and a border style.

Any idea what I am doing wrong here? It works fine if I do it cell by 
cell, for


But that seems like a bit overkill.


Nick Renders

More information about the omnisdev-en mailing list