Good day Everyone,
I am in the process of creating a script that extracts object info from ARIS into Excel, so that a mass update could be made without changing the GUIDs that was included. I need to lock individual Cells or Columns A - P for all the rows but keep Columns Q to T unlocked for editing.
I am using the following code to create the Excel sheet:
OUTEXCEL = Context.createOutputObject(Context.getSelectedFormat(), fileName + corDate + extension);
And defined the output as follows:
OUTEXCEL.DefineF("NORMAL", "Arial", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, Constants.FMT_LEFT | Constants.FMT_VTOP, 0, 1, 0, 0, 0, 1);
OUTEXCEL.BeginTable(100, Constants.C_BLACK, Constants.C_TRANSPARENT, Constants.FMT_LEFT, 0);
And write a new line:
OUTEXCEL.TableRow();
OUTEXCEL.TableCellF(a, 40, "NORMAL");
OUTEXCEL.TableCellF(b, 40, "NORMAL");
Can anyone help with a suggestion or idea on how I can lock a cell after writing to it, or lock the columns before:
OUTEXCEL.EndTable(tblName, 100, "Arial", 12, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_LEFT | Constants.FMT_VTOP, 0);
OUTEXCEL.WriteReport();
Thank you very much,
Willem
Pablo Gonzalez on
Hi Willem, first of all you need to use the
createExcelWorkbookinstead of createOutputObject to enable additional methods and classes. Maybe the example below will help...