Skip to main content
Inspiring
January 20, 2025
Question

How to get numbered list format value in a paragraph style to populate a CSV?

  • January 20, 2025
  • 1 reply
  • 559 views

I have a script that pushes the values of all paragraph style settings in an InDesign document to a CSV, but I can't get the numbered list format to export:

 
case ListType.NUMBERED_LIST:
arr.push("Numbered");
switch (ps.NumberingFormat) {
case NumberingStyle.ARABIC:
arr.push("1, 2, 3, 4...");
break;
case NumberingStyle.SINGLE_LEADING_ZEROS:
arr.push("01, 02, 03...");
break;
case NumberingStyle.UPPER_ROMAN:
arr.push("I, II, III, IV...");
break;
case NumberingStyle.LOWER_ROMAN:
arr.push("i, ii, iii, iv...");
break;
case NumberingStyle.UPPER_LETTERS:
arr.push("A, B, C, D...");
break;
case NumberingStyle.LOWER_LETTERS:
arr.push("a, b, c, d...");
break;
default:
arr.push("Not found");
}
 
No matter the numbered list format chosen in the paragraph style, I get "Not found" populated in the CSV. I can't figure what I'm doing wrong.
 
Example:
Paragraph Style Options > Bullets and Numbering:
List Type: Numbers
Format: A, B, C, D...
 
What I'd expect in the CSV:
List typeList Type
NumberedA, B, C, D...

 

What I get:

List typeFormat
NumberedNot found

1 reply

Robert at ID-Tasker
Legend
January 20, 2025

Just get the value - it doesn't use enumerator - but returns it as a string.

 

 

I'm not doing Select...Case - yet it returns text values.

 

Maybe in ME / Japan version it will - so instead of default "Not found" - push the value.

break;
default:
arr.push(ps.NumberingFormat);
}
Robert at ID-Tasker
Legend
January 20, 2025

Or rather you should be using: 

 

ps.numberingFormat

 

Stefan Rakete
Inspiring
January 21, 2025

or ps.numberingStyle  

?