AdvStringGrid Export and Import filters
TExportOptions.CellMargins Property

AdvStringGrid by default has margins around the columns and rows. This means that for example a 20 pixel wide column might have 16 pixels of effective width. When this property is false, that column will be exported as 16 pixels to Excel. When true, the column width will be 20 pixels in Excel.IMPORTANT NOTE: YOU CAN SET THIS PROPERTY TO TRUE ONLY IF YOU ARE NOT REIMPORTING THE FILE. If you have an import/export cycle and this property is true, the column widths will grow ad infinitum. For example, imagine you export the column width at 20px. When importing, the column in advstringgrid will be 24 pixels, to fit all the text inside Excel. When you export this file again, it will be 24px, and when imported 28 and so on. In short, this property allows for a nicer export, but can only be used if you are not importing.

property CellMargins: Boolean;
Copyright (c) 2002-2013 TMS Software. All rights reserved.
What do you think about this topic? Send feedback!