I am trying to make the Excel file produced with Stata to look exactly as the prototype supplied by the client.
I am having troubles with specifying row heights.
Consider the following [example] code:
Code:
clear all version 17.0 mata b = xl() b.create_book("C:\temp\test.xlsx","Test","xlsx") b.set_sheet("Test") b.set_row_height(1,1,36) /* !?!? */ b.set_column_width(1,1,128) b.close_book() end
Array
This is being executed in Stata/MP 17.0 for Windows (64-bit x86-64).
I don't notice such a big discrepancy for the column width, though, Excel reports the width of the column A above as 128.09.
I wonder if there is any bug in the functioning of the set_row_height() method in mata? or if perhaps some other units are used to specify the row height?
I've noticed also that the ratio of 36 to 24 is suspiciously close to the zoom setting for my display, which should not matter in theory, but just in case:
Array
Is this a known problem that has been fixed? Is it reproducible on another machine/platform? With a different version of MS Office?
Any hints on how to achieve precise setting of the dimensions (widths and heights) in Excel are much appreciated.
Thank you and best regards, Sergiy
0 Response to Excel formatting dimensions
Post a Comment