is it just me or you can not set a variable’s name as letter G, other letters and words are fine and work normally. is it something related to programming like in windows can not set file floder name to “con”?!
In what language, Basic, Python, JavaScript, BeanShell?
… or Writer’s Variable-related fields, or e.g. Calc’s named ranges, or … ? (The writer
and calc
as tags, and no macro-related tags, don’t clarify it at all )
Please provide examples of “letters and words” which have worked normally. Preferably, also show them in the context where you have used them (the entire command/statement, exactly as appearing in your code).
I was just using fields in writer with mail merge and a sheet as data source. it happened that my first raw that contains headers was simple, I named columns A, B, C, H, and just simple one letter like A for Age N for Number H for Height and so on. one column was capital G, and the variable I set as G for conditional formatting just simply failed to mail merge properly, while all other variables worked properly and mail merged the data source correctly. after 2 hours of trying to do make it work, I thought to try and change the header in calc and the variable name. just worked fine and the whole document was working. made me curious and want to ask about it. thanks
So when you mention “variables” you are referring to column headers in a Calc spreadsheet, which you use as field names in a merge operation. Is that right?
“Variable” is a somewhat generic term, so to address your problem it is important that we establish exactly what we are dealing with. No derogatory implication intended.
If my interpretation of your description is correct, this should work fine in the merge operation, assuming that you have the database registered “with headers”. However, if you reference the single letter G
(or any other single letter, or letter pair) within the spreadsheet, it may be interpreted as the column coordinate for the cell grid (meaning 7th column from left
).
Does this shed light on the issue? If not, please provide more detail of where and how you have things working, and where and how you are trying to make it work but it fails. At best attach your files displaying the issue, but remember that this is a public place so you need to avoid revealing confidential info.
For robustness, it is wise to use proper words in the column headers. Even Age doubles as a column coordinate (as do 50% of all other possible three letter combos starting with A). I would use “AgeOld” or something like that as a header instead. This also makes it easier for you to read the merge template while you are working with it.