I have created Excel template files where certain descriptive information is already populated in a given cell in the template, and I'd like to populate the blank cell next to that cell with the contents from an object attribute.
For example, in my template I have a cell "A1" already populated with the text "DATE", and in the next blank cell "A2", I'd like to export the attribute "DateOfSubmission". This is a simple example to demonstrate my problem. I actually have about 20 attributes that I'd like to export to Excel, but to specific cells for each attribute - and the cells jump around a bit, so it's not something I can do by simply incrementing rows/columns. I played around with the Enhanced Export to Excel script from Galactic Solutions, and I'm thinking there may be something I have to do with the EXCEL_FIRST_CELL_IDENTIFIER that points to cell "A1" by default. I created several additional string variables to allow for each attribute I'm exporting and I've identified the cells I want populated, but I can't seem to locate where in the script I would loop through and use each one:
// Used in doExcelExportSheetTab()
const string EXCEL_FIRST_CELL_IDENTIFIER = "M2"
const string EXCEL_2ND_CELL_IDENTIFIER = "U6"
const string EXCEL_3RD_CELL_IDENTIFIER = "A11"
const string EXCEL_4TH_CELL_IDENTIFIER = "S9"
const string EXCEL_5TH_CELL_IDENTIFIER = "S12"
const string EXCEL_6TH_CELL_IDENTIFIER = "U7"
const string EXCEL_7TH_CELL_IDENTIFIER = "N15"
const string EXCEL_8TH_CELL_IDENTIFIER = "S15"
const string EXCEL_9TH_CELL_IDENTIFIER = "A18"
const string EXCEL_10TH_CELL_IDENTIFIER = "A20"
const string EXCEL_11TH_CELL_IDENTIFIER = "A23"
const string EXCEL_12TH_CELL_IDENTIFIER = "R24"
const string EXCEL_13TH_CELL_IDENTIFIER = "A26"
const string EXCEL_14TH_CELL_IDENTIFIER = "J26"
const string EXCEL_15TH_CELL_IDENTIFIER = "A28"
const string EXCEL_16TH_CELL_IDENTIFIER = "L28"
const string EXCEL_17TH_CELL_IDENTIFIER = "A30"
const string EXCEL_18TH_CELL_IDENTIFIER = "J30"
const string EXCEL_19TH_CELL_IDENTIFIER = "A33"
const string EXCEL_20TH_CELL_IDENTIFIER = "A35"
const string EXCEL_21ST_CELL_IDENTIFIER = "A37"
const string EXCEL_22ND_CELL_IDENTIFIER = "A39"
Basically, all that is displayed in the export view are the attributes that I want to use to populate the above, so when I choose to export, the script doesn't have to do any fancy parsin. Just take each attribute displayed and put the contents in the identified cells. Sounds simple, but I know it isn't. Any help or suggestions are appreciated.
Pinned topic Export Certain Attributes to Excel, Naming Specific Cells
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2011-01-11T13:45:44Z at 2011-01-11T13:45:44Z by ChrisAnnal
Chris Annal 2700052QUY35 Posts
Re: Export Certain Attributes to Excel, Naming Specific Cells2014-04-16T16:41:42ZThis is the accepted answer. This is the accepted answer.
- ChrisAnnal 270002B7K5
Found this old, unanswered post of mine. I have since written the scripts I need in order to populate an Excel template with only the desired attribute values. Thanks,