Retrieves or sets the saved-by user name stored in the classic XLS WRITEACCESS record. Read/write WideString
Syntax
property UserName: WideString;
Overview
UserName is an alias for LastSavedBy. Both
properties read and write the same classic XLS WRITEACCESS value, so
applications can employ the naming convention that best matches their
existing code
New workbooks return HotXLS until a caller assigns a value
Workbooks opened from an existing XLS file preserve the original
WRITEACCESS bytes until either property is assigned. Assigned values are
stored as UTF-16 and truncated to 54 characters so the fixed-width record
body remains valid
Example
This example stores an explicit audit user name before saving the workbook
Workbook.UserName := 'Alice';
Workbook.SaveAs('C:\audit.xls');
See also